Permalink
Browse files

Add unit test for prepareStatementForSqlObject

  • Loading branch information...
1 parent 3710394 commit c1a7f89861e1b27c829279fa07635d15201f11ae @cdekok cdekok committed Mar 7, 2013
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/ZendTest/Db/Sql/SqlTest.php
@@ -16,6 +16,11 @@ class TableGatewayTest extends \PHPUnit_Framework_TestCase
{
protected $mockAdapter = null;
+
+ /**
+ * Sql object
+ * @var Zend\Db\Sql\Sql
+ */
protected $sql = null;
public function setup()
@@ -110,4 +115,14 @@ public function testDelete()
$this->sql->delete('bar');
}
+
+ /**
+ * @covers Zend\Db\Sql\Sql::prepareStatementForSqlObject
+ */
+ public function testprepareStatementForSqlObject()
+ {
+ $insert = $this->sql->insert()->columns(array('foo'));
+ $stmt = $this->sql->prepareStatementForSqlObject($insert);
+ $this->assertInstanceOf('Zend\Db\Adapter\Driver\StatementInterface', $stmt);
+ }
}

0 comments on commit c1a7f89

Please sign in to comment.