Ejemplo n.º 1
0
 /**
  * @return null
  */
 public function setUp()
 {
     $this->conn = new Connection($this->getConnectionDetail());
     $this->assertTrue($this->conn->connect());
     $driver = $this->conn->getDriver();
     $this->adapter = new Adapter($driver);
 }
Ejemplo n.º 2
0
 /**
  * @return null
  */
 public function setUp()
 {
     $this->conn = new Connection($this->getConnectionDetail());
     $this->assertTrue($this->conn->connect());
     $driver = $this->conn->getDriver();
     $this->stmtDriver = $driver->stmt_init();
     $this->stmt = new Stmt($this->stmtDriver);
 }
Ejemplo n.º 3
0
 /**
  * @return null
  */
 public function testConnectClose()
 {
     $this->assertTrue($this->conn->connect());
     $this->assertEquals('connected', $this->conn->getStatus());
     $this->assertTrue($this->conn->isConnected());
     $this->assertFalse($this->conn->isError());
     $this->assertTrue($this->conn->close());
     $this->assertEquals('closed', $this->conn->getStatus());
     $this->assertFalse($this->conn->isDriver());
     $this->assertFalse($this->conn->isConnected());
     $this->assertFalse($this->conn->isError());
     /* lets see if we can connect again */
     $this->assertFalse($this->conn->connect());
     $this->assertEquals('closed', $this->conn->getStatus());
     $this->assertFalse($this->conn->isConnected());
     $this->assertTrue($this->conn->isError());
 }