feat: add configurable HLS CORS allowlists
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user