xref: /php-src/ext/date/tests/bug60302-002.phpt (revision 90434d7f)
1--TEST--
2Test for bug #60302: DateTimeImmutable::createFromFormat should new static(), not new self()
3--FILE--
4<?php
5
6class MyDateTime extends DateTimeImmutable { }
7
8$d = MyDateTime::createFromFormat('Y-m-d', '2011-01-01');
9
10echo get_class($d);
11?>
12--EXPECT--
13MyDateTime
14