summaryrefslogtreecommitdiffstats
path: root/test/php/library/Director/Objects/IcingaServiceTest.php
diff options
context:
space:
mode:
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();
}
}