Test database error
This commit is contained in:
parent
23a68803a1
commit
15b71edbd6
1 changed files with 5 additions and 0 deletions
|
@ -121,6 +121,11 @@ class DependencyCheckTest extends TestCase
|
||||||
self::assertInstanceOf(Database::class, $database);
|
self::assertInstanceOf(Database::class, $database);
|
||||||
self::assertContains($database->getDriver(), [Database::PDO, Database::MYSQLI], 'The driver returns an unexpected value');
|
self::assertContains($database->getDriver(), [Database::PDO, Database::MYSQLI], 'The driver returns an unexpected value');
|
||||||
self::assertNotNull($database->getConnection(), 'There is no database connection');
|
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');
|
self::assertTrue($database->connected(), 'The database is not connected');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue