|
3 | 3 | use Francerz\Http\Utils\UriHelper;
|
4 | 4 | use PHPUnit\Framework\TestCase;
|
5 | 5 |
|
| 6 | +use function Francerz\Http\Utils\baseUrl; |
| 7 | +use function Francerz\Http\Utils\siteUrl; |
| 8 | + |
6 | 9 | class UriHelperTest extends TestCase
|
7 | 10 | {
|
8 | 11 | private static function callPrivateStatic($obj, string $method, ...$args)
|
@@ -55,7 +58,7 @@ public function testGetBaseUrl()
|
55 | 58 | {
|
56 | 59 | $this->assertEquals(
|
57 | 60 | 'http://localhost/assets/css/style.css',
|
58 | | - UriHelper::getBaseUrl('/assets/css/style.css', [ |
| 61 | + baseUrl('/assets/css/style.css', [ |
59 | 62 | 'HTTP_HOST' => 'localhost',
|
60 | 63 | 'SCRIPT_NAME' => '/index.php'
|
61 | 64 | ])
|
@@ -100,7 +103,7 @@ public function testGetSiteUrl()
|
100 | 103 | {
|
101 | 104 | $this->assertEquals(
|
102 | 105 | 'https://localhost:3000/public/index.php/some/path',
|
103 | | - UriHelper::getSiteUrl('/some/path', [ |
| 106 | + siteUrl('/some/path', [ |
104 | 107 | 'HTTPS' => 'on',
|
105 | 108 | 'SERVER_NAME' => 'localhost',
|
106 | 109 | 'SERVER_PORT' => 3000,
|
|
0 commit comments