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_complex.xml')); } public function tearDown(): void { $this->engine = null; } public function testDefaultPrice(): void { $this->engine->calc(); $this->assertSame(31.63, $this->engine->getPrice()); } public function testAuflage500(): void { $this->engine->setVariable('auflage', 500); $this->assertSame(94.68, $this->engine->getPrice()); } public function testAndereProduktArt2(): void { $this->engine->setVariable('produktart_nopresentationpdf', 2); $this->assertSame(31.63, $this->engine->getPrice()); } public function testAndereProduktArt3(): void { $this->engine->setVariable('produktart_nopresentationpdf', 3); $this->assertSame(31.63, $this->engine->getPrice()); } }