示例#1
0
 /**
  * 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();
     }
 }
示例#2
0
 /**
  * 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());
     }
 }
示例#3
0
 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());
 }