protected function tearDown() { ini_set('display_errors', $this->_oldDisplayErrors); error_reporting($this->_oldErrorLevel); Mage::setIsDeveloperMode($this->_oldIsDeveloperMode); unset($this->_model); parent::tearDown(); }
protected function tearDown() { unset($this->_model); parent::tearDown(); }
/** * Unset created data during tests */ protected function tearDown() { unset($this->_model, $this->_customerData); parent::tearDown(); }
/** * Loads expected data from test case annotations * * @see Mage_Test_Model_Test_Loadable_Interface::loadByTestCase() */ public function loadByTestCase(Mage_Test_Unit_Case $testCase) { $expectations = $testCase->getAnnotationByName('loadExpectation'); if (!$expectations) { $expectations[] = null; } $expectationData = array(); foreach ($expectations as $expectation) { if (empty($expectation)) { $expectation = null; } $expectationFile = $testCase->getYamlFilePath('expectations', $expectation); if (!$expectationFile) { $text = 'There was no expectation defined for current test case'; if ($expectation) { $text = sprintf('Cannot load expectation %s', $expectation); } throw new RuntimeException($text); } $expectationData = array_merge_recursive($expectationData, Spyc::YAMLLoad($expectationFile)); } $this->_loadedData = new Varien_Object($expectationData); return $this; }
protected function setUp() { parent::setUp(); $this->_block = Mage::getModel('Mage_Core_Model_Layout')->createBlock('Mage_Checkout_Block_Onepage_Payment_Methods'); }
/** * Set up controller params * (non-PHPdoc) * @see Mage_Test_Unit_Case::setUp() */ protected function setUp() { parent::setUp(); $this->reset(); $this->registerCookieStub(); $this->getCookies()->reset(); $this->app()->getFrontController()->init(); }
/** * Loads fixture files from test case annotations * * @param Mage_Test_Unit_Case $testCase * @return Mage_Test_Model_Fixture */ public function loadByTestCase(Mage_Test_Unit_Case $testCase) { $fixtures = $testCase->getAnnotationByName('loadFixture', array('class', 'method')); $cacheOptions = $testCase->getAnnotationByName('cache', 'method'); $this->_parseCacheOptions($cacheOptions); $this->_loadFixtureFiles($fixtures, $testCase); return $this; }