summaryrefslogtreecommitdiffstats
path: root/test/php/library/Director/Objects/IcingaServiceTest.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:47 +0000
commit5419d4428c86c488a43124f85e5407d7cbae6541 (patch)
tree772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /test/php/library/Director/Objects/IcingaServiceTest.php
parentAdding upstream version 1.10.2. (diff)
downloadicingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.tar.xz
icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.zip
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/php/library/Director/Objects/IcingaServiceTest.php')
-rw-r--r--test/php/library/Director/Objects/IcingaServiceTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/php/library/Director/Objects/IcingaServiceTest.php b/test/php/library/Director/Objects/IcingaServiceTest.php
index 468db67..3005349 100644
--- a/test/php/library/Director/Objects/IcingaServiceTest.php
+++ b/test/php/library/Director/Objects/IcingaServiceTest.php
@@ -26,15 +26,14 @@ class IcingaServiceTest extends BaseTestCase
);
}
- /**
- * @expectedException \RuntimeException
- */
public function testFailsToStoreWithMissingLazyRelations()
{
if ($this->skipForMissingDb()) {
return;
}
+ $this->expectException(\RuntimeException::class);
+
$db = $this->getDb();
$service = $this->service();
$service->display_name = 'Something else';
@@ -45,16 +44,16 @@ class IcingaServiceTest extends BaseTestCase
public function testAcceptsAssignRules()
{
+ $this->expectNotToPerformAssertions();
$service = $this->service();
$service->object_type = 'apply';
$service->assign_filter = 'host.address="127.*"';
}
- /**
- * @expectedException \LogicException
- */
public function testRefusesAssignRulesWhenNotBeingAnApply()
{
+ $this->expectException(\LogicException::class);
+
$service = $this->service();
$service->assign_filter = 'host.address=127.*';
}
@@ -271,7 +270,7 @@ class IcingaServiceTest extends BaseTestCase
return file_get_contents(__DIR__ . '/rendered/' . $name . '.out');
}
- public function tearDown()
+ public function tearDown(): void
{
if ($this->hasDb()) {
$db = $this->getDb();
@@ -289,5 +288,7 @@ class IcingaServiceTest extends BaseTestCase
}
}
}
+
+ parent::tearDown();
}
}