Include more verbose error message

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-01-28 14:57:27 +01:00
parent 7ca28f105b
commit d4447a53fa

View File

@ -39,7 +39,7 @@ class Environment_Test extends PHPUnit_Framework_TestCase
public function testMySQL()
{
if (!extension_loaded('pdo_mysql')) {
$this->markTestSkipped('pdo_myql is missing');
$this->markTestSkipped('pdo_mysql is missing');
}
try {
$pdo = new PDO(
@ -49,7 +49,7 @@ class Environment_Test extends PHPUnit_Framework_TestCase
);
$this->assertNull(
$pdo->errorCode(),
"Error when trying to connect to database"
"Error when trying to connect to database: " . $pdo->errorInfo()[2]
);
//$pdo->beginTransaction();
@ -58,7 +58,7 @@ class Environment_Test extends PHPUnit_Framework_TestCase
$this->assertEquals(
0,
$pdo->errorCode(),
'Error trying to show tables for database'
'Error trying to show tables for database: ' . $pdo->errorInfo()[2]
);
}
catch (Exception $e) {