TimeZoneDeprecationTest.php
Namespace
Drupal\Tests\system\KernelFile
-
core/
modules/ system/ tests/ src/ Kernel/ TimeZoneDeprecationTest.php
View source
<?php
namespace Drupal\Tests\system\Kernel;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests deprecated methods in bootstrap throw deprecation warnings.
*
* @group legacy
* @group system
*/
class TimeZoneDeprecationTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'system',
'user',
];
/**
* @expectedDeprecation drupal_get_user_timezone() is deprecated in drupal:8.8.0. It will be removed from drupal:9.0.0. Use date_default_timezone_get() instead. See https://www.drupal.org/node/3009387
*/
public function testDeprecation() {
$this->assertEquals('Australia/Sydney', drupal_get_user_timezone());
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
TimeZoneDeprecationTest | Tests deprecated methods in bootstrap throw deprecation warnings. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.