mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-20 12:24:29 +02:00
UrlTest: Test whether getAbsoluteUrl returns the given username and password
refs #12133
This commit is contained in:
parent
2439460371
commit
d0b93b064c
@ -9,6 +9,15 @@ use Icinga\Test\BaseTestCase;
|
|||||||
|
|
||||||
class UrlTest extends 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()
|
public function testWhetherFromRequestWorksWithoutARequest()
|
||||||
{
|
{
|
||||||
$this->getRequestMock()->shouldReceive('getBaseUrl')->andReturn('/path/to')
|
$this->getRequestMock()->shouldReceive('getBaseUrl')->andReturn('/path/to')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user