2017-10-31 13:40:13 +01:00
|
|
|
<?php
|
|
|
|
|
2017-10-31 14:23:23 +01:00
|
|
|
namespace Engelsystem\Test\Feature\Database;
|
2017-10-31 13:40:13 +01:00
|
|
|
|
|
|
|
use Engelsystem\Config\Config;
|
2019-10-13 21:06:24 +02:00
|
|
|
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
|
|
|
|
{
|
2019-10-13 21:06:24 +02:00
|
|
|
$this->app->instance('config', new Config([
|
|
|
|
'database' => $this->getDbConfig(),
|
|
|
|
'timezone' => 'UTC',
|
|
|
|
]));
|
2017-10-31 13:40:13 +01:00
|
|
|
|
2019-10-13 21:06:24 +02:00
|
|
|
$serviceProvider = new DatabaseServiceProvider($this->app);
|
2017-10-31 13:40:13 +01:00
|
|
|
$serviceProvider->register();
|
2019-10-13 21:06:24 +02:00
|
|
|
$this->assertTrue($this->app->has(Database::class));
|
2017-10-31 13:40:13 +01:00
|
|
|
}
|
|
|
|
}
|