Tells whether tow Coordinate objects are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $coordinate ) : boolean | ||
$coordinate | ValueObjects\ValueObjectInterface | |
return | boolean |
public function testSameValueAs() { $coordinate2 = new Coordinate(new Latitude(40.829137), new Longitude(16.555838)); $coordinate3 = new Coordinate(new Latitude(40.829137), new Longitude(16.555838), Ellipsoid::WGS60()); $this->assertTrue($this->coordinate->sameValueAs($coordinate2)); $this->assertTrue($coordinate2->sameValueAs($this->coordinate)); $this->assertFalse($this->coordinate->sameValueAs($coordinate3)); $mock = $this->getMock('ValueObjects\\ValueObjectInterface'); $this->assertFalse($this->coordinate->sameValueAs($mock)); }