_db->select() ->from('zfproducts'); $stmt = $this->_db->prepare($select->__toString()); try { $stmt->nextRowset(); } catch (Zend_Db_Statement_Exception $e) { $this->assertType('Zend_Db_Statement_Exception', $e, 'Expecting object of type Zend_Db_Statement_Exception, got '.get_class($e)); $this->assertEquals('SQLSTATE[HYC00]: Optional feature not implemented', $e->getMessage()); } $stmt->closeCursor(); } /** * Ensures that the character sequence ":0'" is handled properly * * @link http://framework.zend.com/issues/browse/ZF-2059 * @return void */ public function testZF2059() { $sql = "SELECT bug_id FROM zfbugs WHERE bug_status != ':0'"; $results = $this->_db->fetchAll($sql); $this->assertEquals(4, count($results)); $select = $this->_db->select()->from('zfbugs', 'bug_id') ->where('bug_status != ?', ':0'); $results = $this->_db->fetchAll($select); $this->assertEquals(4, count($results)); } /** * @group ZF-7706 */ public function testStatementCanReturnDriverStatement() { $statement = parent::testStatementCanReturnDriverStatement(); $this->assertType('PDOStatement', $statement->getDriverStatement()); } public function getDriver() { return 'Pdo_Mysql'; } }