saufen/tests/Feature/Service/Config/AppNameTest.php
2025-06-10 19:05:55 +02:00

20 lines
633 B
PHP

<?php
declare(strict_types=1);
use App\Enum\SystemSettingKey;
use App\Service\Config\AppName;
use App\Service\ConfigurationService;
test('it returns the system name from configuration service', function (): void {
/** @var ConfigurationService $configService */
$configService = $this->getContainer()->get(ConfigurationService::class);
$appName = new AppName($configService);
expect((string) $appName)->toBe(SystemSettingKey::SYSTEM_NAME->defaultValue());
$expected = 'Test System Name';
$configService->set(SystemSettingKey::SYSTEM_NAME, $expected);
expect((string) $appName)->toBe($expected);
});