Mercurial > hg > cmmr2012-drupal-site
view core/modules/simpletest/src/Tests/TimeZoneTest.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line source
<?php namespace Drupal\simpletest\Tests; use Drupal\simpletest\WebTestBase; /** * This test will check SimpleTest's default time zone handling. * * @group simpletest */ class TimeZoneTest extends WebTestBase { /** * A user with administrative privileges. */ protected $adminUser; /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->adminUser = $this->drupalCreateUser(['administer site configuration']); } /** * Tests that user accounts have the default time zone set. */ 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.'); } }