예제 #1
0
 public function testCreateWithDefaultPrecision()
 {
     $eur = new Currency("EUR");
     $this->assertSame("EUR", $eur->getCode());
     $this->assertSame(Currency::getDefaultPrecision("EUR"), $eur->getPrecision());
 }
예제 #2
0
파일: Currency.php 프로젝트: sugiphp/money
 /**
  * Checks if the Currency is equal to the given one
  *
  * @param Currency $other
  *
  * @return boolean
  */
 public function isEqualTo(Currency $other)
 {
     return $other->getCode() === $this->code;
 }