/** * A test ended. * * @param PHPUnit_Framework_Test $test * @param float $time */ public function endTest(PHPUnit_Framework_Test $test, $time) { Mage::dispatchEvent('phpunit_test_end_before', array('test' => $test, 'listener' => $this)); if ($test instanceof PHPUnit_Framework_TestCase) { EcomDev_PHPUnit_Test_Case_Util::getFixture(get_class($test))->setScope(EcomDev_PHPUnit_Model_FixtureInterface::SCOPE_LOCAL)->discard(); // Clear applied fixture if (EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->isLoaded()) { EcomDev_PHPUnit_Test_Case_Util::getExpectation(get_class($test))->discard(); } EcomDev_PHPUnit_Test_Case_Util::tearDown(); EcomDev_PHPUnit_Helper::tearDown(); } Mage::dispatchEvent('phpunit_test_end_after', array('test' => $test, 'listener' => $this)); }
/** * Retrieves fixture model singleton * * @return EcomDev_PHPUnit_Model_Fixture */ protected static function getFixture() { return TestUtil::getFixture(get_called_class()); }