|
|
@@ -132,6 +132,20 @@ class Zend_Db_Statement_MysqliTest extends Zend_Db_Statement_TestCommon
|
|
|
$this->assertType('mysqli_stmt', $statement->getDriverStatement());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Tests that the statement returns FALSE when no records are found
|
|
|
+ * @group ZF-5675
|
|
|
+ */
|
|
|
+ public function testStatementReturnsFalseOnEmpty()
|
|
|
+ {
|
|
|
+ $products = $this->_db->quoteIdentifier('zfproducts');
|
|
|
+ $sql = 'SELECT * FROM ' . $products . ' WHERE 1=2';
|
|
|
+ $stmt = $this->_db->query($sql);
|
|
|
+ $result = $stmt->fetch();
|
|
|
+ $this->assertFalse($result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public function getDriver()
|
|
|
{
|
|
|
return 'Mysqli';
|