Fix failing search dashboard test
This commit is contained in:
parent
c294283636
commit
176177d874
|
@ -22,12 +22,14 @@ namespace Icinga\Test {
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
use stdClass;
|
||||||
use Mockery;
|
use Mockery;
|
||||||
use PHPUnit_Framework_TestCase;
|
use PHPUnit_Framework_TestCase;
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Data\ConfigObject;
|
use Icinga\Data\ConfigObject;
|
||||||
use Icinga\Data\ResourceFactory;
|
|
||||||
use Icinga\Data\Db\DbConnection;
|
use Icinga\Data\Db\DbConnection;
|
||||||
|
use Icinga\Data\ResourceFactory;
|
||||||
|
use Icinga\Web\View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BaseTestCase
|
* Class BaseTestCase
|
||||||
|
@ -167,7 +169,12 @@ namespace Icinga\Test {
|
||||||
return $libDir;
|
return $libDir;
|
||||||
})
|
})
|
||||||
->shouldReceive('getRequest')->andReturn($requestMock)
|
->shouldReceive('getRequest')->andReturn($requestMock)
|
||||||
->shouldReceive('getResponse')->andReturn($responseMock);
|
->shouldReceive('getResponse')->andReturn($responseMock)
|
||||||
|
->shouldReceive('getViewRenderer')->andReturnUsing(function () {
|
||||||
|
$viewRenderer = new stdClass();
|
||||||
|
$viewRenderer->view = new View();
|
||||||
|
return $viewRenderer;
|
||||||
|
});
|
||||||
|
|
||||||
Icinga::setApp($bootstrapMock, true);
|
Icinga::setApp($bootstrapMock, true);
|
||||||
return $bootstrapMock;
|
return $bootstrapMock;
|
||||||
|
|
Loading…
Reference in New Issue