예제 #1
0
파일: RatioTest.php 프로젝트: krixon/math
 /**
  * @covers ::__construct
  */
 public function testCannotInstantiateWithZeroConsequent()
 {
     self::expectException(\InvalidArgumentException::class);
     new Ratio(Decimal::one(), Decimal::zero());
 }
예제 #2
0
 /**
  * @covers ::zero
  */
 public function testCanCreateZero()
 {
     $zero = Decimal::zero();
     self::assertSame('0', $zero->toString());
     self::assertSame($zero, Decimal::zero());
 }