Icinga\Web\Request::getParam() should be mocked as well by default

This commit is contained in:
Johannes Meyer 2014-09-09 13:01:09 +02:00
parent 40947acd16
commit 9d8f810e10
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ namespace Icinga\Test {
$requestMock = Mockery::mock('Icinga\Web\Request')->shouldDeferMissing(); $requestMock = Mockery::mock('Icinga\Web\Request')->shouldDeferMissing();
$requestMock->shouldReceive('getPathInfo')->andReturn('')->byDefault() $requestMock->shouldReceive('getPathInfo')->andReturn('')->byDefault()
->shouldReceive('getBaseUrl')->andReturn('/')->byDefault() ->shouldReceive('getBaseUrl')->andReturn('/')->byDefault()
->shouldReceive('getQuery')->andReturn(array())->byDefault(); ->shouldReceive('getQuery')->andReturn(array())->byDefault()
->shouldReceive('getParam')->with(Mockery::type('string'), Mockery::type('string'))
->andReturnUsing(function ($name, $default) { return $default; })->byDefault();
$responseMock = Mockery::mock('Icinga\Web\Response')->shouldDeferMissing(); $responseMock = Mockery::mock('Icinga\Web\Response')->shouldDeferMissing();