public function DrupalDateTimeTest::testSystemTimezone in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php \Drupal\Tests\system\Functional\Datetime\DrupalDateTimeTest::testSystemTimezone()
- 10 core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php \Drupal\Tests\system\Functional\Datetime\DrupalDateTimeTest::testSystemTimezone()
Test that the AJAX Timezone Callback can deal with various formats.
File
- core/
modules/ system/ tests/ src/ Functional/ Datetime/ DrupalDateTimeTest.php, line 37
Class
- DrupalDateTimeTest
- Tests DrupalDateTime functionality.
Namespace
Drupal\Tests\system\Functional\DatetimeCode
public function testSystemTimezone() {
$options = [
'query' => [
'date' => 'Tue+Sep+17+2013+21%3A35%3A31+GMT%2B0100+(BST)#',
],
];
// Query the AJAX Timezone Callback with a long-format date.
$response = $this
->drupalGet('system/timezone/BST/3600/1', $options);
$this
->assertEqual($response, '"Europe\\/London"', 'Timezone AJAX callback successfully identifies and responds to a long-format date.');
}