parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml'))); $this->engine = new Engine(); $this->engine->setPaperContainer($paperContainer); $this->engine->setPaperRepository($repository); $this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt')); $this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt')); $this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml')); $this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml')); } public function tearDown(): void { $this->engine = null; } public function testPrice(): void { $this->engine->calc(); file_put_contents("/tmp/f1.txt", print_r($this->engine->getDebugCalcFormel(),true )); self::assertSame(131.86, $this->engine->getPrice()); } public function testPriceProductArt(): void { $this->engine->setVariable('produktart_nopresentationpdf', 61); $this->engine->calc(); self::assertSame(199.6, $this->engine->getPrice()); } }