Пример #1
0
 public function testCreateWithDefaultPrecision()
 {
     $eur = new Currency("EUR");
     $this->assertSame("EUR", $eur->getCode());
     $this->assertSame(Currency::getDefaultPrecision("EUR"), $eur->getPrecision());
 }
Пример #2
0
 /**
  * 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;
 }