/** * @depends testInitialState * @return */ public function testConnectBadDbSocket_Failure() { $params = array('host' => 'localhost', 'user' => 'af_tester', 'pass' => 'w3k3r', 'name' => 'af_unittest', 'socket' => 'blah'); $conn = new MysqliConn($params); $this->assertFalse($conn->connect()); $this->assertFalse($conn->isConnected()); $this->assertTrue($conn->isError()); $error = $conn->getError(); $this->assertEquals(2002, $error['error-nbr']); $msg = "No such file or directory"; $this->assertContains($msg, $error['error-text']); }
/** * @return mysqli */ public function getDriver() { return $this->conn->getDriver(); }