diff --git a/test/php/library/Icinga/Web/Widget/DashboardTest.php b/test/php/library/Icinga/Web/Widget/DashboardTest.php index 181dec0a9..9387ed483 100644 --- a/test/php/library/Icinga/Web/Widget/DashboardTest.php +++ b/test/php/library/Icinga/Web/Widget/DashboardTest.php @@ -9,7 +9,6 @@ require_once realpath(dirname(__FILE__) . '/../../../../bootstrap.php'); use Mockery; use Icinga\Test\BaseTestCase; -use Icinga\User; use Icinga\Web\Widget\Dashboard; use Icinga\Web\Widget\Dashboard\Pane; use Icinga\Web\Widget\Dashboard\Dashlet; @@ -46,23 +45,6 @@ class DashboardTest extends BaseTestCase Mockery::close(); // Necessary because some tests run in a separate process } - public function setUp() - { - $moduleMock = Mockery::mock('Icinga\Application\Modules\Module'); - $moduleMock->shouldReceive('getPaneItems')->andReturn(array( - 'test-pane' => new Pane('Test Pane') - )); - $moduleMock->shouldReceive('getName')->andReturn('test'); - - $moduleManagerMock = Mockery::mock('Icinga\Application\Modules\Manager'); - $moduleManagerMock->shouldReceive('getLoadedModules')->andReturn(array( - 'test-module' => $moduleMock - )); - - $bootstrapMock = $this->setupIcingaMock(); - $bootstrapMock->shouldReceive('getModuleManager')->andReturn($moduleManagerMock); - } - public function testWhetherCreatePaneCreatesAPane() { $dashboard = new Dashboard(); @@ -126,24 +108,6 @@ class DashboardTest extends BaseTestCase ); } - /** - * @depends testWhetherCreatePaneCreatesAPane - */ - public function testLoadPaneItemsProvidedByEnabledModules() - { - $user = new User('test'); - $user->setPermissions(array('*' => '*')); - $dashboard = new Dashboard(); - $dashboard->setUser($user); - $dashboard->load(); - - $this->assertCount( - 1, - $dashboard->getPanes(), - 'Dashboard::load() could not load panes from enabled modules' - ); - } - /** * @expectedException \Icinga\Exception\ProgrammingError * @depends testWhetherCreatePaneCreatesAPane