From 896efa47581637932342dbc9cc2930e5b40a4135 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E17406D\\boonkerz" Date: Tue, 22 Nov 2022 18:15:02 +0100 Subject: [PATCH] Fix Calc --- tests/Customer/R/CalcTest.php | 10 ++++++++++ tests/Customer/R/calc.xml | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/Customer/R/CalcTest.php b/tests/Customer/R/CalcTest.php index 9110e8c..b8ae586 100644 --- a/tests/Customer/R/CalcTest.php +++ b/tests/Customer/R/CalcTest.php @@ -52,6 +52,16 @@ class CalcTest extends TestCase } 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->calc(); diff --git a/tests/Customer/R/calc.xml b/tests/Customer/R/calc.xml index bc0d505..103fe7c 100644 --- a/tests/Customer/R/calc.xml +++ b/tests/Customer/R/calc.xml @@ -140,11 +140,13 @@ - -