Example #1
0
 public function testCustomErrorMessage()
 {
     $sql = "select * from invalid_table_name";
     $statement = new Statement($sql, $this->connection);
     $statement->execute();
     $error = new Error($statement, 'my custom message');
     $actual = $error->getErrorMessage();
     $this->assertContains('my custom message', $actual);
     $actual = $statement->getErrorMessage('another message');
     $this->assertContains('another message', $actual);
 }