function TimeZoneFormHelperTest::setUp

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Datetime/TimeZoneFormHelperTest.php \Drupal\Tests\Core\Datetime\TimeZoneFormHelperTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Datetime/TimeZoneFormHelperTest.php, line 20

Class

TimeZoneFormHelperTest
@coversDefaultClass \Drupal\Core\Datetime\TimeZoneFormHelper @group Datetime

Namespace

Drupal\Tests\Core\Datetime

Code

protected function setUp() : void {
    parent::setUp();
    $container = new ContainerBuilder();
    $container->set('string_translation', $this->getStringTranslationStub());
    \Drupal::setContainer($container);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.