mirror of
https://github.com/koel/koel
synced 2024-11-27 22:40:26 +00:00
27 lines
695 B
PHP
27 lines
695 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
use Tests\TestCase;
|
|
|
|
class ApplicationTest extends TestCase
|
|
{
|
|
#[Test]
|
|
public function staticUrlsWithoutCdnAreConstructedCorrectly(): void
|
|
{
|
|
config(['koel.cdn.url' => '']);
|
|
|
|
self::assertSame('http://localhost/', static_url());
|
|
self::assertSame('http://localhost/foo.css', static_url('/foo.css '));
|
|
}
|
|
|
|
#[Test]
|
|
public function staticUrlsWithCdnAreConstructedCorrectly(): void
|
|
{
|
|
config(['koel.cdn.url' => 'http://cdn.tld']);
|
|
|
|
self::assertSame('http://cdn.tld/', static_url());
|
|
self::assertSame('http://cdn.tld/foo.css', static_url('/foo.css '));
|
|
}
|
|
}
|