/** * Disconnect from the database. */ protected function _disconnect() { // run 'teardown' sql from the fixture if ($this->_fixtures) { $this->_fixtures->teardown(); } if (Mad_Model_Base::isConnected()) { Mad_Model_Base::removeConnection(); } $this->_conn = null; }
public function testTeardown() { $fixtures = new Mad_Test_Fixture_Collection($this->_conn, 'unit_tests'); $fixtures->teardown(); $this->assertEquals('0', $this->_countRecords()); }