From 5419d4428c86c488a43124f85e5407d7cbae6541 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:47 +0200 Subject: Adding upstream version 1.11.1. Signed-off-by: Daniel Baumann --- test/php/library/Director/Objects/IcingaServiceTest.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test/php/library/Director/Objects/IcingaServiceTest.php') 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(); } } -- cgit v1.2.3