[Form] Fixed tests failing on systems with timezones other than +01:00
This commit is contained in:
parent
75dfc8fe97
commit
655d645568
@ -964,13 +964,15 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase
|
|||||||
$form = $this->factory->createNamed('name', 'datetime', '2011-02-03 04:05:06', array(
|
$form = $this->factory->createNamed('name', 'datetime', '2011-02-03 04:05:06', array(
|
||||||
'input' => 'string',
|
'input' => 'string',
|
||||||
'widget' => 'single_text',
|
'widget' => 'single_text',
|
||||||
|
'data_timezone' => 'UTC',
|
||||||
|
'user_timezone' => 'UTC',
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
||||||
'/input
|
'/input
|
||||||
[@type="datetime"]
|
[@type="datetime"]
|
||||||
[@name="name"]
|
[@name="name"]
|
||||||
[@value="2011-02-03T04:05:06+01:00"]
|
[@value="2011-02-03T04:05:06Z"]
|
||||||
'
|
'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -982,13 +984,15 @@ abstract class AbstractLayoutTest extends \PHPUnit_Framework_TestCase
|
|||||||
'date_widget' => 'choice',
|
'date_widget' => 'choice',
|
||||||
'time_widget' => 'choice',
|
'time_widget' => 'choice',
|
||||||
'widget' => 'single_text',
|
'widget' => 'single_text',
|
||||||
|
'data_timezone' => 'UTC',
|
||||||
|
'user_timezone' => 'UTC',
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
$this->assertWidgetMatchesXpath($form->createView(), array(),
|
||||||
'/input
|
'/input
|
||||||
[@type="datetime"]
|
[@type="datetime"]
|
||||||
[@name="name"]
|
[@name="name"]
|
||||||
[@value="2011-02-03T04:05:06+01:00"]
|
[@value="2011-02-03T04:05:06Z"]
|
||||||
'
|
'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user