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 testCalcPrice(): void { self::assertSame(2, $this->engine->getArticles()->count()); self::assertSame(5000.0, $this->engine->getPrice()); $this->engine->setActiveArticle($this->engine->getArticles()[1]->getName()); self::assertSame(7500.0, $this->engine->getPrice()); } }