From 64eb2a7f68e0c493494f9fcaa43337cdde38559f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 4 Aug 2023 14:30:48 +0200 Subject: [PATCH] BaseTestCase: Use Icinga Web's base test case --- library/Businessprocess/Test/BaseTestCase.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/library/Businessprocess/Test/BaseTestCase.php b/library/Businessprocess/Test/BaseTestCase.php index 807905d..daab69c 100644 --- a/library/Businessprocess/Test/BaseTestCase.php +++ b/library/Businessprocess/Test/BaseTestCase.php @@ -7,21 +7,21 @@ use Icinga\Application\ApplicationBootstrap; use Icinga\Application\Icinga; use Icinga\Module\Businessprocess\BpConfig; use Icinga\Module\Businessprocess\Storage\LegacyStorage; -use Icinga\Module\Businessprocess\Web\FakeRequest; -use PHPUnit_Framework_TestCase; -abstract class BaseTestCase extends PHPUnit_Framework_TestCase +abstract class BaseTestCase extends \Icinga\Test\BaseTestCase { /** @var ApplicationBootstrap */ private static $app; - /** - * @inheritdoc - */ - public function setUp() + public function setUp(): void { - $this->app(); - FakeRequest::setConfiguredBaseUrl('/icingaweb2/'); + parent::setUp(); + + $this->getRequestMock()->shouldReceive('getBaseUrl')->andReturn('/icingaweb2/'); + + $this->app() + ->getModuleManager() + ->loadModule('businessprocess'); } protected function emptyConfigSection()