/**
  * @covers Zend\Db\Adapter\Driver\IbmDb2\Statement::prepare
  * @covers Zend\Db\Adapter\Driver\IbmDb2\Statement::isPrepared
  */
 public function testPrepare()
 {
     $db2Resource = db2_connect($this->variables['database'], $this->variables['username'], $this->variables['password']);
     $statement = new Statement();
     $statement->initialize($db2Resource);
     $this->assertFalse($statement->isPrepared());
     $this->assertSame($statement, $statement->prepare("SELECT 'foo' FROM SYSIBM.SYSDUMMY1"));
     $this->assertTrue($statement->isPrepared());
     unset($resource, $db2Resource);
 }
Beispiel #2
0
 /**
  * @param  Statement $statementPrototype
  * @return IbmDb2
  */
 public function registerStatementPrototype(Statement $statementPrototype)
 {
     $this->statementPrototype = $statementPrototype;
     $this->statementPrototype->setDriver($this);
     return $this;
 }
Beispiel #3
0
 /**
  * @covers Zend\Db\Adapter\Driver\IbmDb2\Statement::getParameterContainer
  * @todo   Implement testGetParameterContainer().
  */
 public function testGetParameterContainer()
 {
     $container = new ParameterContainer();
     $this->statement->setParameterContainer($container);
     $this->assertSame($container, $this->statement->getParameterContainer());
 }