public function tearDown() { if (isset($this->_conn)) { $this->_conn->query('SET FOREIGN_KEY_CHECKS = 1;'); $this->_conn->rollback(); $this->_conn = null; } if (!self::$_setUp) { throw new PHPUnit_Framework_Exception(get_class($this) . '::setUp() not called before start test.'); } self::$_setUp = false; }