1--TEST--
2Tests for DateTimeImmutable::createFromMutable.
3--INI--
4date.timezone=Europe/London
5--FILE--
6<?php
7$current = "2014-03-02 16:24:08";
8
9$i = DateTimeImmutable::createFromMutable( date_create( $current ) );
10var_dump( $i );
11
12$i = DateTimeImmutable::createFromMutable( date_create_immutable( $current ) );
13var_dump( $i );
14?>
15--EXPECTF--
16object(DateTimeImmutable)#%d (3) {
17  ["date"]=>
18  string(26) "2014-03-02 16:24:08.000000"
19  ["timezone_type"]=>
20  int(3)
21  ["timezone"]=>
22  string(13) "Europe/London"
23}
24
25Warning: DateTimeImmutable::createFromMutable() expects parameter 1 to be DateTime, object given in %stests%eDateTimeImmutable_createFromMutable.php on line %d
26NULL
27