You are here

public function TimeZoneTest::testAccountTimeZones in SimpleTest 8.3

Tests that user accounts have the default time zone set.

File

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