Fix UrlTest utilizing BaseTestCase::setupIcingaMock()

This commit is contained in:
Johannes Meyer 2014-09-09 10:21:09 +02:00
parent d6377ca00c
commit a5c027b77c
1 changed files with 2 additions and 4 deletions

View File

@ -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(