Fixes
This commit is contained in:
parent
e3df96216a
commit
fa9993e94b
@ -206,6 +206,10 @@ class Engine
|
||||
if(!isset($this->variables[$option->getId()]) && $option->getDefault() !== null && !$option instanceof Text) {
|
||||
$this->variables[$option->getId()] = $option->getDefault();
|
||||
}
|
||||
|
||||
if(isset($this->variables[$option->getId()])) {
|
||||
$option->setValue($this->variables[$option->getId()]);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if Option is valid
|
||||
|
||||
@ -53,6 +53,8 @@ class OptionsRemoveTest extends \PHPUnit_Framework_TestCase
|
||||
$this->engine->setVariables(['gebyn' => 2]);
|
||||
$this->engine->calc('test1');
|
||||
|
||||
$this->assertEquals(2, $article->getOptionById('gebyn')->getValue());
|
||||
|
||||
$option = $article->getOptionById('gebwert');
|
||||
|
||||
$this->assertFalse($option->isValid());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user