engelsystem/tests/Feature/Database/DatabaseServiceProviderTest...

28 lines
711 B
PHP
Raw Normal View History

2017-10-31 13:40:13 +01:00
<?php
declare(strict_types=1);
namespace Engelsystem\Test\Feature\Database;
2017-10-31 13:40:13 +01:00
use Engelsystem\Config\Config;
use Engelsystem\Database\Database;
2017-10-31 13:40:13 +01:00
use Engelsystem\Database\DatabaseServiceProvider;
2017-10-31 19:26:48 +01:00
class DatabaseServiceProviderTest extends DatabaseTest
2017-10-31 13:40:13 +01:00
{
/**
* @covers \Engelsystem\Database\DatabaseServiceProvider::register()
*/
public function testRegister(): void
2017-10-31 13:40:13 +01:00
{
$this->app->instance('config', new Config([
'database' => $this->getDbConfig(),
'timezone' => 'UTC',
]));
2017-10-31 13:40:13 +01:00
$serviceProvider = new DatabaseServiceProvider($this->app);
2017-10-31 13:40:13 +01:00
$serviceProvider->register();
$this->assertTrue($this->app->has(Database::class));
2017-10-31 13:40:13 +01:00
}
}