engelsystem/tests/Unit/Helpers/VersionServiceProviderTest.php

29 lines
731 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
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
*/
public function testRegister(): void
{
$app = new Application();
2023-02-28 15:58:41 +01:00
$app->instance('path', '/tmp');
$app->instance('path.storage.app', '/tmp');
$serviceProvider = new VersionServiceProvider($app);
$serviceProvider->register();
$this->assertArrayHasKey(Version::class, $app->contextual);
}
}