Commit c63dd209 authored by catch's avatar catch
Browse files

Issue #1987856 by mparker17, vijaycs85, sidharthap, disasm, ianmthomasuk:...

Issue #1987856 by mparker17, vijaycs85, sidharthap, disasm, ianmthomasuk: Convert system_timezone() to a new style controller.
parent aa05c211
......@@ -36,6 +36,20 @@ public function setUp() {
}
/**
* Test that the AJAX Timezone Callback can deal with various formats.
*/
public function testSystemTimezone() {
$options = array(
'query' => array(
'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.');
}
/**
* Test that DrupalDateTime can detect the right timezone to use.
* Test with a variety of less commonly used timezone names to
......
......@@ -344,9 +344,12 @@ system.modules_uninstall_confirm:
_permission: 'administer modules'
system.timezone:
path: '/system/timezone'
path: '/system/timezone/{abbreviation}/{offset}/{is_daylight_saving_time}'
defaults:
_controller: '\Drupal\system\Controller\TimezoneController::getTimezone'
abbreviation: ''
offset: -1
is_daylight_saving_time: NULL
requirements:
_access: 'TRUE'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment