mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-08-16 15:28:11 +02:00
CustomVariablesTest: testVarsCanBeUnsetAndSetAgain
This commit is contained in:
parent
8390457939
commit
d915bb25f7
@ -26,6 +26,24 @@ class CustomVariablesTest extends BaseTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testVarsCanBeUnsetAndSetAgain()
|
||||
{
|
||||
$vars = $this->newVars();
|
||||
$vars->one = 'two';
|
||||
unset($vars->one);
|
||||
$vars->one = 'three';
|
||||
|
||||
$res = array();
|
||||
foreach ($vars as $k => $v) {
|
||||
$res[$k] = $v->getValue();
|
||||
}
|
||||
|
||||
$this->assertEquals(
|
||||
array('one' => 'three'),
|
||||
$res
|
||||
);
|
||||
}
|
||||
|
||||
protected function indentVarsList($vars)
|
||||
{
|
||||
return $this->indent . implode(
|
||||
|
Loading…
x
Reference in New Issue
Block a user