public function testCreateSelectStatementWithRows() { $rows = array("foo", "bar"); $stmt = Test\DbStatement::createSelectStatement($rows); $this->assertType('Zend\\Test\\DbStatement', $stmt); $this->assertEquals($rows, $stmt->fetchAll()); }
public function testAppendStatementToStack() { $stmt1 = Test\DbStatement::createSelectStatement(array()); $this->_adapter->appendStatementToStack($stmt1); $stmt2 = Test\DbStatement::createSelectStatement(array()); $this->_adapter->appendStatementToStack($stmt2); $this->assertSame($stmt2, $this->_adapter->query("foo")); $this->assertSame($stmt1, $this->_adapter->query("foo")); }