Test database error

This commit is contained in:
Michael 2020-11-08 07:29:13 +00:00
parent 23a68803a1
commit 15b71edbd6

View file

@ -121,6 +121,11 @@ class DependencyCheckTest extends TestCase
self::assertInstanceOf(Database::class, $database);
self::assertContains($database->getDriver(), [Database::PDO, Database::MYSQLI], 'The driver returns an unexpected value');
self::assertNotNull($database->getConnection(), 'There is no database connection');
$result = $database->p("SELECT 1");
self::assertEquals($database->errorMessage(), '', 'There had been a database error message');
self::assertEquals($database->errorNo(), 0, 'There had been a database error number');
self::assertTrue($database->connected(), 'The database is not connected');
}