Fix Calc
This commit is contained in:
parent
eba3da933c
commit
896efa4758
@ -52,6 +52,16 @@ class CalcTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testOptionCheckbox(): void
|
public function testOptionCheckbox(): void
|
||||||
|
{
|
||||||
|
self::assertTrue($this->engine->getArticle()->getOptionById('checkboxen2')->getOptions()[0]->isSelected());
|
||||||
|
self::assertTrue($this->engine->getArticle()->getOptionById('checkboxen2')->getOptions()[1]->isSelected());
|
||||||
|
|
||||||
|
self::assertFalse($this->engine->getArticle()->getOptionById('checkboxen3')->getOptions()[0]->isSelected());
|
||||||
|
self::assertTrue($this->engine->getArticle()->getOptionById('checkboxen3')->getOptions()[1]->isSelected());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testOptionDefaultCheckbox(): void
|
||||||
{
|
{
|
||||||
$this->engine->setVariable('checkboxen1', [1,2]);
|
$this->engine->setVariable('checkboxen1', [1,2]);
|
||||||
$this->engine->calc();
|
$this->engine->calc();
|
||||||
|
|||||||
@ -140,11 +140,13 @@
|
|||||||
<opt id="1" name="Auswahl 1-1"></opt>
|
<opt id="1" name="Auswahl 1-1"></opt>
|
||||||
<opt id="2" name="Auswahl 1-2"></opt>
|
<opt id="2" name="Auswahl 1-2"></opt>
|
||||||
</option>
|
</option>
|
||||||
<option id="checkboxen2" name="Checkboxen 2" type="Checkbox">
|
<option id="checkboxen2" name="Checkboxen 2" type="Checkbox" default="1,2">
|
||||||
<opt id="1" name="Auswahl 2-1"></opt>
|
<opt id="1" name="Auswahl 2-1"></opt>
|
||||||
|
<opt id="2" name="Auswahl 2-2"></opt>
|
||||||
</option>
|
</option>
|
||||||
<option id="checkboxen3" name="Checkboxen 3" type="Checkbox">
|
<option id="checkboxen3" name="Checkboxen 3" type="Checkbox" default="2">
|
||||||
<opt id="1" name="Auswahl 3-1"></opt>
|
<opt id="1" name="Auswahl 3-1"></opt>
|
||||||
|
<opt id="2" name="Auswahl 3-2"></opt>
|
||||||
</option>
|
</option>
|
||||||
<!-- ### Eingabebox einzeilig 1 ### -->
|
<!-- ### Eingabebox einzeilig 1 ### -->
|
||||||
<option id="input1" name="Eingabe" type="Input" />
|
<option id="input1" name="Eingabe" type="Input" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user