예제 #1
0
파일: Unit.php 프로젝트: lerre/framework
 /**
  * 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;
 }
예제 #2
0
 public function testTeardown()
 {
     $fixtures = new Mad_Test_Fixture_Collection($this->_conn, 'unit_tests');
     $fixtures->teardown();
     $this->assertEquals('0', $this->_countRecords());
 }