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.

8.0.x
Nathaniel Catchpole 2014-08-08 11:05:46 +01:00
parent 258856aee9
commit 9af55ec10f
1 changed files with 2 additions and 2 deletions

View File

@ -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(