From a5c027b77c606c2be94d5d2c40c7d8400fd31eb8 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Sep 2014 10:21:09 +0200 Subject: [PATCH] Fix UrlTest utilizing BaseTestCase::setupIcingaMock() --- test/php/library/Icinga/Web/UrlTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/php/library/Icinga/Web/UrlTest.php b/test/php/library/Icinga/Web/UrlTest.php index 5da50c3f8..68206beee 100644 --- a/test/php/library/Icinga/Web/UrlTest.php +++ b/test/php/library/Icinga/Web/UrlTest.php @@ -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(