diff --git a/tests/src/flextype/core/Parsers/Shortcodes/UrlShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/UrlShortcodeTest.php index a33ea346..377bfebb 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/UrlShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/UrlShortcodeTest.php @@ -2,8 +2,26 @@ declare(strict_types=1); -test('[url] shortcode', function () { - registry()->set('flextype.settings.url', 'https://awilum.github.io/flextype'); +test('[getBaseUrl] shortcode', function () { + registry()->set('flextype.settings.base_url', 'https://awilum.github.io/flextype'); - $this->assertStringContainsString('https://awilum.github.io/flextype', parsers()->shortcodes()->parse('[url]')); + $this->assertStringContainsString('https://awilum.github.io/flextype', parsers()->shortcodes()->parse('[getBaseUrl]')); }); + +test('[getBasePath] shortcode', function () { + app()->setBasePath('/foo/'); + + $this->assertStringContainsString('/foo/', parsers()->shortcodes()->parse('[getBasePath]')); +}); + +test('[getAbsoluteUrl] shortcode', function () { + $this->assertStringContainsString('/', parsers()->shortcodes()->parse('[getAbsoluteUrl]')); +}); + +test('[getUriString] shortcode', function () { + $this->assertStringContainsString('', parsers()->shortcodes()->parse('[getUriString]')); +}); + +test('[urlFor] shortcode', function () { + $this->assertStringContainsString('', parsers()->shortcodes()->parse('[urlFor routeName="test-route" queryParams=\'{"foo": "Foo"}\']')); +}); \ No newline at end of file