markTestSkipped( 'Cannot redefine constant/function - missing runkit extension' ); } // case 1 $formDisplay = $this->getMockBuilder('PMA\libraries\config\FormDisplay') ->disableOriginalConstructor() ->setMethods(array('process', 'getDisplay')) ->getMock(); $formDisplay->expects($this->once()) ->method('process') ->with(false) ->will($this->returnValue(false)); $formDisplay->expects($this->once()) ->method('getDisplay') ->with(true, true); PMA_Process_formset($formDisplay); // case 2 $formDisplay = $this->getMockBuilder('PMA\libraries\config\FormDisplay') ->disableOriginalConstructor() ->setMethods(array('process', 'hasErrors', 'displayErrors')) ->getMock(); $formDisplay->expects($this->once()) ->method('process') ->with(false) ->will($this->returnValue(true)); $formDisplay->expects($this->once()) ->method('hasErrors') ->with() ->will($this->returnValue(true)); ob_start(); PMA_Process_formset($formDisplay); $result = ob_get_clean(); $this->assertContains( '