mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
24 lines
640 B
PHP
24 lines
640 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use Tests\TestCase;
|
|
|
|
class ApplicationTest extends TestCase
|
|
{
|
|
public function testStaticUrlsWithoutCdnAreConstructedCorrectly(): void
|
|
{
|
|
config(['koel.cdn.url' => '']);
|
|
|
|
self::assertSame('http://localhost/', static_url());
|
|
self::assertSame('http://localhost/foo.css', static_url('/foo.css '));
|
|
}
|
|
|
|
public function testStaticUrlsWithCdnAreConstructedCorrectly(): 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 '));
|
|
}
|
|
}
|