29 lines
869 B
PHP
29 lines
869 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Plugin\AzuraCastOnDemandHls\Tests\Entity;
|
|
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
use PHPUnit\Framework\TestCase;
|
|
use Plugin\AzuraCastOnDemandHls\Entity\StationCorsConfiguration;
|
|
|
|
#[CoversClass(StationCorsConfiguration::class)]
|
|
final class StationCorsConfigurationTest extends TestCase
|
|
{
|
|
public function testItKeepsStationScopedConfiguredOrigins(): void
|
|
{
|
|
$configuration = new StationCorsConfiguration(11, ['https://aifrequency.org']);
|
|
$configuration->setAllowedOrigins([
|
|
'https://aifrequency.org',
|
|
'https://www.aifrequency.org',
|
|
]);
|
|
|
|
self::assertSame(11, $configuration->getStationId());
|
|
self::assertSame([
|
|
'https://aifrequency.org',
|
|
'https://www.aifrequency.org',
|
|
], $configuration->getAllowedOrigins());
|
|
}
|
|
}
|