diff --git a/test/php/library/Director/IcingaConfig/AssignRendererTest.php b/test/php/library/Director/IcingaConfig/AssignRendererTest.php index b54f6378..70aa45c1 100644 --- a/test/php/library/Director/IcingaConfig/AssignRendererTest.php +++ b/test/php/library/Director/IcingaConfig/AssignRendererTest.php @@ -1,6 +1,6 @@ skipForMissingDb()) { + return; + } + $db = $this->getDb(); $this->host()->store($db); $host = IcingaHost::load($this->testHostName, $db); @@ -166,9 +170,11 @@ class IcingaHostTest extends BaseTestCase public function tearDown() { - $db = $this->getDb(); - if (IcingaHost::exists($this->testHostName, $db)) { - IcingaHost::load($this->testHostName, $db)->delete(); + if ($this->hasDb()) { + $db = $this->getDb(); + if (IcingaHost::exists($this->testHostName, $db)) { + IcingaHost::load($this->testHostName, $db)->delete(); + } } } } diff --git a/test/php/library/Director/Objects/IcingaTimePeriodRangesTest.php b/test/php/library/Director/Objects/IcingaTimePeriodRangesTest.php index 37ed0ff7..a62bc77b 100644 --- a/test/php/library/Director/Objects/IcingaTimePeriodRangesTest.php +++ b/test/php/library/Director/Objects/IcingaTimePeriodRangesTest.php @@ -1,6 +1,6 @@ skipForMissingDb()) { + return; + } + $period = $this->createTestPeriod(); $newRanges = array(