equals() public method

Checks whether the value represented by this object equals to the other
public equals ( Money $other ) : boolean
$other Money
return boolean
Example #1
0
 public function testEquality()
 {
     $m1 = new Money(100, new Currency('EUR'));
     $m2 = new Money(100, new Currency('EUR'));
     $m3 = new Money(100, new Currency('USD'));
     $m4 = new Money(50, new Currency('EUR'));
     $this->assertTrue($m1->equals($m2));
     $this->assertFalse($m1->equals($m3));
     $this->assertFalse($m1->equals($m4));
 }