Commit 11e10c49 authored by Patrick Louys's avatar Patrick Louys Committed by Marco Pivetta

added test to make sure that fetch returns false if nothing is found

parent f84b0c16
......@@ -239,6 +239,13 @@ class DataAccessTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->assertEquals('foo', $row[1]);
}
public function testFetchNoResult()
{
$sql = "SELECT test_int FROM fetch_table WHERE test_int = ?";
$row = $this->_conn->executeQuery($sql, array(-1))->fetch();
$this->assertFalse($row);
}
public function testFetchAssoc()
{
$sql = "SELECT test_int, test_string FROM fetch_table WHERE test_int = ? AND test_string = ?";
......
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