public function testGetClone() { $subject = new LocalDate('2016-01-01', 'Europe/Berlin'); $clone = $subject->getClone(); // the values must be the same $this->assertEquals($subject->getTimestamp(), $clone->getTimestamp()); $this->assertEquals($subject->getTimezone(), $clone->getTimezone()); // but they must be represented by other objects $this->assertNotSame($subject, $clone); $this->assertNotSame($subject->getDate(), $clone->getDate()); $this->assertNotSame($subject->getTimezone(), $clone->getTimezone()); }