diff --git a/src/Engine.php b/src/Engine.php index f71d2b8..b5f7264 100644 --- a/src/Engine.php +++ b/src/Engine.php @@ -208,7 +208,8 @@ class Engine } if(isset($this->variables[$option->getId()])) { - $option->setValue($this->variables[$option->getId()]); + $option->setRawValue($this->variables[$option->getId()]); + $option->processValue(); } } diff --git a/tests/Calc/OptionsRemoveTest.php b/tests/Calc/OptionsRemoveTest.php index bb42e8d..562f821 100644 --- a/tests/Calc/OptionsRemoveTest.php +++ b/tests/Calc/OptionsRemoveTest.php @@ -53,7 +53,7 @@ class OptionsRemoveTest extends \PHPUnit_Framework_TestCase $this->engine->setVariables(['gebyn' => 2]); $this->engine->calc('test1'); - $this->assertEquals(2, $article->getOptionById('gebyn')->getValue()); + $this->assertEquals("Nein", $article->getOptionById('gebyn')->getValue()); $option = $article->getOptionById('gebwert');