Beispiel #1
0
 /**
  * Compare values
  */
 public function testCompareValues()
 {
     $currency = new Currency\Currency(array('currency' => 'EUR', 'locale' => 'de_AT', 'value' => 100));
     $currency2 = new Currency\Currency(array('currency' => 'EUR', 'locale' => 'de_AT', 'value' => 100));
     $this->assertEquals(0, $currency->compare($currency2));
     $currency3 = new Currency\Currency(array('currency' => 'EUR', 'locale' => 'de_AT', 'value' => 101));
     $this->assertEquals(-1, $currency->compare($currency3));
     $currency4 = new Currency\Currency(array('currency' => 'EUR', 'locale' => 'de_AT', 'value' => 99));
     $this->assertEquals(1, $currency->compare($currency4));
 }