/** * Teardown fixture data. Use transaction to speed up deletes * * @todo suppress log noise of SQL from fixture teardowns */ public function teardown() { Mad_Test_Fixture_Base::resetToTeardown(); foreach ($this->_fixtures as $fixture) { $fixture->teardown(); } }
/** * Delete fixture data from the database */ protected function _teardownFixtures() { Mad_Test_Fixture_Base::resetToTeardown(); foreach ($this->_fixtures as $fixture) { $fixture->teardown(); $this->_print("deleting " . $fixture->getYmlName()); } }
public function testResetToTeardown() { $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests_more'); $fixture->teardown(); $expected = array('unit_tests' => 0, 'unit_tests_more' => 0); $this->assertEquals($expected, $fixture->getToTeardown()); $fixture->resetToTeardown(); $expected = array('unit_tests' => 1, 'unit_tests_more' => 1); $this->assertEquals($expected, $fixture->getToTeardown()); }