public function test__equals() { $a = Clock::tick(Clock::system(self::PARIS()), Duration::ofMillis(500)); $b = Clock::tick(Clock::system(self::PARIS()), Duration::ofMillis(500)); $this->assertEquals($a->equals($a), true); $this->assertEquals($a->equals($b), true); $this->assertEquals($b->equals($a), true); $this->assertEquals($b->equals($b), true); $c = Clock::tick(Clock::system(self::MOSCOW()), Duration::ofMillis(500)); $this->assertEquals($a->equals($c), false); $d = Clock::tick(Clock::system(self::PARIS()), Duration::ofMillis(499)); $this->assertEquals($a->equals($d), false); $this->assertEquals($a->equals(null), false); $this->assertEquals($a->equals("other type"), false); $this->assertEquals($a->equals(Clock::systemUTC()), false); }