mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix UrlTest utilizing BaseTestCase::setupIcingaMock()
This commit is contained in:
parent
d6377ca00c
commit
a5c027b77c
@ -12,11 +12,9 @@ class UrlTest extends BaseTestCase
|
||||
{
|
||||
public function testWhetherFromRequestWorksWithoutARequest()
|
||||
{
|
||||
$request = Mockery::mock('Icinga\Web\Request');
|
||||
$request->shouldReceive('getPathInfo')->andReturn('my/test/url.html')
|
||||
->shouldReceive('getBaseUrl')->andReturn('/path/to')
|
||||
$this->getRequestMock()->shouldReceive('getBaseUrl')->andReturn('/path/to')
|
||||
->shouldReceive('getPathInfo')->andReturn('my/test/url.html')
|
||||
->shouldReceive('getQuery')->andReturn(array('param1' => 'value1', 'param2' => 'value2'));
|
||||
$this->setupIcingaMock($request);
|
||||
|
||||
$url = Url::fromRequest();
|
||||
$this->assertEquals(
|
||||
|
Loading…
x
Reference in New Issue
Block a user