예제 #1
0
 /**
  * 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));
 }
예제 #2
0
 /**
  * Returns expectation model singleton
  *
  * @return EcomDev_PHPUnit_Model_Expectation
  * @deprecated since 0.3.0
  */
 protected function getExpectation()
 {
     return TestUtil::getExpectation(get_class($this));
 }