Commit d8693fe8 authored by catch's avatar catch

Issue #2889803 by mpdonadio: Add test coverage for default time zone in tests

parent 77043e42
......@@ -503,4 +503,18 @@ public function testInstall() {
$this->assertTrue(file_exists($htaccess_filename), "$htaccess_filename exists");
}
/**
* Tests the assumption that local time is in 'Australia/Sydney'.
*/
public function testLocalTimeZone() {
// The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
$this->assertEquals('Australia/Sydney', date_default_timezone_get());
// The 'Australia/Sydney' time zone is also set in
// FunctionalTestSetupTrait::initConfig().
$config_factory = $this->container->get('config.factory');
$value = $config_factory->get('system.date')->get('timezone.default');
$this->assertEquals('Australia/Sydney', $value);
}
}
......@@ -214,6 +214,14 @@ public function testFileDefaultScheme() {
$this->assertEquals('public', \Drupal::config('system.file')->get('default_scheme'));
}
/**
* Tests the assumption that local time is in 'Australia/Sydney'.
*/
public function testLocalTimeZone() {
// The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
$this->assertEquals('Australia/Sydney', date_default_timezone_get());
}
/**
* {@inheritdoc}
*/
......
......@@ -95,6 +95,14 @@ public function testAddTestsBySuiteNamespaceCore($filesystem, $suite_namespace,
$this->assertEmpty(array_diff_assoc($expected_tests, $stub->testFiles));
}
/**
* Tests the assumption that local time is in 'Australia/Sydney'.
*/
public function testLocalTimeZone() {
// The 'Australia/Sydney' time zone is set in core/tests/bootstrap.php
$this->assertEquals('Australia/Sydney', date_default_timezone_get());
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment