You are here

public function TimeZoneTest::testAccountTimeZones in Drupal 8

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.');
}