TimeZoneTest.php in Drupal 8
File
core/modules/simpletest/src/Tests/TimeZoneTest.php
View source
<?php
namespace Drupal\simpletest\Tests;
use Drupal\simpletest\WebTestBase;
class TimeZoneTest extends WebTestBase {
protected $adminUser;
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'administer site configuration',
]);
}
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.');
}
}
Classes
Name |
Description |
TimeZoneTest |
This test will check WebTestBase's default time zone handling. |