public function testSetISODate() { $time = '2000-01-02T03:14:25'; $immutable = new DateTimeImmutable($time); $control = new DateTimeImmutable($time); $mutable = new DateTime($time); $new = $immutable->setISODate(2005, 10, 5); $mutable->setISODate(2005, 10, 5); $this->assertNotSame($immutable, $new); $this->assertSame($control->format(DateTime::RFC3339), $immutable->format(DateTime::RFC3339)); $this->assertSame($mutable->format(DateTime::RFC3339), $new->format(DateTime::RFC3339)); }