diff --git a/test/php/library/Icinga/Web/UrlTest.php b/test/php/library/Icinga/Web/UrlTest.php index 0481d723b..e4648ba0d 100644 --- a/test/php/library/Icinga/Web/UrlTest.php +++ b/test/php/library/Icinga/Web/UrlTest.php @@ -9,6 +9,15 @@ use Icinga\Test\BaseTestCase; class UrlTest extends BaseTestCase { + public function testWhetherGetAbsoluteUrlReturnsTestUrl(){ + $url = Url::fromPath('http://testusername:testpassword@testsite.com/path/to/my/url.html'); + $this->assertEquals( + 'http://testusername:testpassword@testsite.com/path/to/my/url.html', + $url->getAbsoluteUrl(), + 'Url::fromPath does not reassemble the correct url' + ); + } + public function testWhetherFromRequestWorksWithoutARequest() { $this->getRequestMock()->shouldReceive('getBaseUrl')->andReturn('/path/to')