function RenderElementTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php \Drupal\Tests\Core\Render\Element\RenderElementTest::setUp()
  2. 10 core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php \Drupal\Tests\Core\Render\Element\RenderElementTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php \Drupal\Tests\Core\Render\Element\RenderElementTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Render/Element/RenderElementTest.php, line 36

Class

RenderElementTest
@coversDefaultClass \Drupal\Core\Render\Element\RenderElement @group Render

Namespace

Drupal\Tests\Core\Render\Element

Code

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

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