UrlTest: Test whether getAbsoluteUrl returns the given username and password
refs #12133
This commit is contained in:
parent
2439460371
commit
d0b93b064c
test/php/library/Icinga/Web
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue