Commit 2a594376 authored by malukenho's avatar malukenho Committed by Steve Müller

Add test case for #688

parent 47642765
...@@ -403,6 +403,24 @@ SQLSTATE[HY000]: General error: 1 near \"MUUHAAAAHAAAA\""); ...@@ -403,6 +403,24 @@ SQLSTATE[HY000]: General error: 1 near \"MUUHAAAAHAAAA\"");
$this->assertSame($result, $conn->fetchColumn($statement, $params, $column, $types)); $this->assertSame($result, $conn->fetchColumn($statement, $params, $column, $types));
} }
public function testConnectionIsClosed()
{
$reflection = new \ReflectionObject($this->_conn);
$connProperty = $reflection->getProperty('_conn');
$connProperty->setAccessible(true);
$connProperty->setValue($this->_conn, new \stdClass);
$connValue = $connProperty->getValue($this->_conn);
$this->assertInstanceOf('stdClass', $connValue);
$this->_conn->close();
$connNewValue = $connProperty->getValue($this->_conn);
$this->assertNull($connNewValue, 'Connection can\'t be closed.');
}
public function testFetchAll() public function testFetchAll()
{ {
$statement = 'SELECT * FROM foo WHERE bar = ?'; $statement = 'SELECT * FROM foo WHERE bar = ?';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment