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