/** * After each test, perform ehough_mockery_Mockery verification tasks and cleanup the * statically stored ehough_mockery_Mockery container for the next test. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { try { $container = ehough_mockery_Mockery::getContainer(); if ($container != null) { $expectation_count = $container->mockery_getExpectationCount(); $test->addToAssertionCount($expectation_count); } ehough_mockery_Mockery::close(); } catch (Exception $e) { $result = $test->getTestResultObject(); $result->addError($test, $e, $time); } }
public function tearDown() { ehough_mockery_Mockery::close(); }
public function testMockeryCloseForIllegalIssetFileInclude() { $m = ehough_mockery_Mockery::mock('StdClass')->shouldReceive('get')->andReturn(false)->getMock(); $m->get(); ehough_mockery_Mockery::close(); }