This commit is contained in:
DESKTOP-E17406D\boonkerz 2022-10-28 14:06:09 +02:00
parent 1a379d8ffd
commit f2bf130ab6
2 changed files with 20 additions and 0 deletions

View File

@ -113,6 +113,16 @@ class Valid
$valid = true; $valid = true;
} }
} }
if($nextShouldBeValid) {
foreach($option->getOptions() as $opt) {
if($opt->isValid()) {
$opt->setIsSelected(true);
break;
}
}
}
$option->processValue(); $option->processValue();
$option->setIsValid($valid); $option->setIsValid($valid);

View File

@ -55,4 +55,14 @@ class CalcTest extends TestCase
} }
public function testCalcPriceDefaultChangeSecound(): void
{
$this->engine->setVariable('print', '885731');
$this->assertSame(50.29, $this->engine->getPrice());
$this->engine->setVariable('print', '885731');
$this->engine->setVariable('auflage', '40329547');
$this->assertSame(276.48, $this->engine->getPrice());
$this->engine->setVariable('print', '885730');
$this->assertSame(11.22, $this->engine->getPrice());
}
} }