2019-07-21 02:34:52 +02:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-07-21 02:34:52 +02:00
|
|
|
namespace Engelsystem\Test\Unit\Helpers;
|
|
|
|
|
|
|
|
use Engelsystem\Application;
|
|
|
|
use Engelsystem\Helpers\Version;
|
|
|
|
use Engelsystem\Helpers\VersionServiceProvider;
|
|
|
|
use Engelsystem\Test\Unit\ServiceProviderTest;
|
|
|
|
|
|
|
|
class VersionServiceProviderTest extends ServiceProviderTest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Helpers\VersionServiceProvider::register
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testRegister(): void
|
2019-07-21 02:34:52 +02:00
|
|
|
{
|
|
|
|
$app = new Application();
|
|
|
|
$app->instance('path.storage.app', '/tmp');
|
|
|
|
|
|
|
|
$serviceProvider = new VersionServiceProvider($app);
|
|
|
|
$serviceProvider->register();
|
|
|
|
|
|
|
|
$this->assertArrayHasKey(Version::class, $app->contextual);
|
|
|
|
}
|
|
|
|
}
|