/** * @return null */ public function tearDown() { $this->assertTrue($this->conn->close()); unset($this->driver); unset($this->adapter); unset($this->conn); }
/** * @return null */ public function testConnectClose() { $this->assertTrue($this->conn->connect()); $this->assertEquals('connected', $this->conn->getStatus()); $this->assertTrue($this->conn->isConnected()); $this->assertFalse($this->conn->isError()); $this->assertTrue($this->conn->close()); $this->assertEquals('closed', $this->conn->getStatus()); $this->assertFalse($this->conn->isDriver()); $this->assertFalse($this->conn->isConnected()); $this->assertFalse($this->conn->isError()); /* lets see if we can connect again */ $this->assertFalse($this->conn->connect()); $this->assertEquals('closed', $this->conn->getStatus()); $this->assertFalse($this->conn->isConnected()); $this->assertTrue($this->conn->isError()); }