Ejemplo n.º 1
0
 /**
  * @dataProvider providerMax
  *
  * @param array  $monies         The monies to compare.
  * @param string $expectedResult The expected money result, or an exception class.
  */
 public function testMax(array $monies, $expectedResult)
 {
     foreach ($monies as &$money) {
         $money = Money::parse($money);
     }
     if ($this->isExceptionClass($expectedResult)) {
         $this->setExpectedException($expectedResult);
     }
     $actualResult = Money::max(...$monies);
     if (!$this->isExceptionClass($expectedResult)) {
         $this->assertMoneyIs($expectedResult, $actualResult);
     }
 }