mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +02:00
IcingaServiceSet: fix tests
This commit is contained in:
parent
18d171991e
commit
a3ac1b8eef
@ -276,7 +276,11 @@ class IcingaServiceSet extends IcingaObject
|
||||
// checking if template object_name is unique
|
||||
// TODO: Move to IcingaObject
|
||||
if (! $this->hasBeenLoadedFromDb() && $this->isTemplate() && static::exists($name, $this->connection)) {
|
||||
throw new DuplicateKeyException('%s template "%s" already existing in database!', $this->getType(), $name);
|
||||
throw new DuplicateKeyException(
|
||||
'%s template "%s" already existing in database!',
|
||||
$this->getType(),
|
||||
$name
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ class IcingaServiceSetTest extends IcingaObjectTestCase
|
||||
$this->createObject('for_set', 'icinga_host', array(
|
||||
'object_type' => 'object',
|
||||
'address' => '1.2.3.4',
|
||||
));
|
||||
), false)->store();
|
||||
|
||||
$host = $this->loadObject('for_set', 'icinga_host');
|
||||
$host->delete();
|
||||
|
Loading…
x
Reference in New Issue
Block a user