/** * @covers ::__construct */ public function testCannotInstantiateWithZeroConsequent() { self::expectException(\InvalidArgumentException::class); new Ratio(Decimal::one(), Decimal::zero()); }
/** * @covers ::zero */ public function testCanCreateZero() { $zero = Decimal::zero(); self::assertSame('0', $zero->toString()); self::assertSame($zero, Decimal::zero()); }