/** * @dataProvider getPurchases * @param float $p * @param float $ds * @param float $er * @param float $s * @param float $res */ public function testCalcs($p, $ds, $er, $s, $pp, $up, $m, $c) { $this->entity->setPurchase($p); $this->entity->setDiscountSupplier($ds); $this->entity->setExpenseRatio($er); $this->entity->setShipping($s); $this->assertEquals($pp, $this->entity->getPurchasePrice()); $this->entity->setUnitPrice($up); $this->assertEquals($m, $this->entity->getMargin()); $this->assertEquals($c, $this->entity->getCoef()); $this->assertTrue($this->entity->isCoefPositive()); }