Issue #2316153 by Berdir: Fixed [typo follow-up] PHP 5.4.30/5.5.15+ changed json_encode() of DateTime objects to include microseconds, breaks tests.
parent
258856aee9
commit
9af55ec10f
|
@ -129,8 +129,8 @@ class FormTestDisabledElementsForm extends FormBase {
|
||||||
// Date.
|
// Date.
|
||||||
$date = new DrupalDateTime('1978-11-01 10:30:00', 'Europe/Berlin');
|
$date = new DrupalDateTime('1978-11-01 10:30:00', 'Europe/Berlin');
|
||||||
// Starting with PHP 5.4.30, 5.5.15, JSON encoded DateTime objects include
|
// Starting with PHP 5.4.30, 5.5.15, JSON encoded DateTime objects include
|
||||||
// microsends. Make sure that the expected value is correct for all versions
|
// microseconds. Make sure that the expected value is correct for all
|
||||||
// by encoding and decoding it again instead of hardcoding it.
|
// versions by encoding and decoding it again instead of hardcoding it.
|
||||||
// See https://github.com/php/php-src/commit/fdb2709dd27c5987c2d2c8aaf0cdbebf9f17f643
|
// See https://github.com/php/php-src/commit/fdb2709dd27c5987c2d2c8aaf0cdbebf9f17f643
|
||||||
$expected = json_decode(json_encode($date), TRUE);
|
$expected = json_decode(json_encode($date), TRUE);
|
||||||
$form['disabled_container']['disabled_container_datetime'] = array(
|
$form['disabled_container']['disabled_container_datetime'] = array(
|
||||||
|
|
Loading…
Reference in New Issue