Commit b75cc857 authored by Patrick Louys's avatar Patrick Louys

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

parent 8144e267
......@@ -237,6 +237,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