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

26 lines
679 B
PHP
Raw Permalink Normal View History

2017-10-31 13:40:13 +01:00
<?php
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()
{
$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
}
}