This commit is contained in:
DESKTOP-E17406D\boonkerz 2023-06-23 09:44:38 +02:00
parent fbac716321
commit 8a78f38c66
3 changed files with 16 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -66,4 +66,13 @@ class CalcTest extends TestCase
$this->assertEquals("format2" , $this->engine->getArticle()->getOptionById('format1')->getName());
}
public function testFormat3(): void
{
$this->engine->setVariable('auflage', 412);
$this->engine->calc();
$this->assertTrue($this->engine->getArticle()->getOptionById('format1')->isValid());
$this->assertEquals(150, $this->engine->getArticle()->getOptionById('format1')->getRawValue());
$this->assertEquals("format3" , $this->engine->getArticle()->getOptionById('format1')->getName());
}
}

View File

@ -20,11 +20,15 @@
</option>
<option id="format1" name="format2" type="Input" default="50">
<auflage>
<grenze>201-</grenze>
<grenze>201-400</grenze>
</auflage>
</option>
<option id="format1" name="format3" type="Input" default="150">
<auflage>
<grenze>401-</grenze>
</auflage>
</option>
</artikel>
<!-- Weitere Kalkulationselemente hier einfügen -->