/**
  * @dataProvider getItems
  */
 public function testCalculate($items, $expected)
 {
     $totalCalculator = new TotalCalculator();
     $result = $totalCalculator->calculate($items);
     $this->assertEquals($expected, $result);
 }
Exemple #2
0
 /**
  * @return $this
  */
 public function calculateTotal()
 {
     $this->totalPrice = $this->totalCalculator->calculate($this->cart);
     return $this;
 }