diff --git a/tests/framework/helpers/UrlTest.php b/tests/framework/helpers/UrlTest.php index 463036210f..d634ec41d4 100644 --- a/tests/framework/helpers/UrlTest.php +++ b/tests/framework/helpers/UrlTest.php @@ -205,4 +205,13 @@ class UrlTest extends TestCase $this->assertEquals('http://example.com/base/index.php?r=page%2Fview&id=10', Url::canonical()); $this->removeMockedAction(); } + + public function testIsRelative() + { + $this->assertTrue(Url::isRelative('/test/index.php')); + $this->assertTrue(Url::isRelative('index.php')); + $this->assertFalse(Url::isRelative('//example.com/')); + $this->assertFalse(Url::isRelative('http://example.com/')); + $this->assertFalse(Url::isRelative('https://example.com/')); + } }