function TimeZoneTest::testAccountTimeZones

Tests that user accounts have the default time zone set.

File

core/modules/simpletest/src/Tests/TimeZoneTest.php, line 32

Class

TimeZoneTest
This test will check WebTestBase's default time zone handling.

Namespace

Drupal\simpletest\Tests

Code

public function testAccountTimeZones() {
    $expected = 'Australia/Sydney';
    $this->assertEqual($this->rootUser
        ->getTimeZone(), $expected, 'Root user has correct time zone.');
    $this->assertEqual($this->adminUser
        ->getTimeZone(), $expected, 'Admin user has correct time zone.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.