function LinkBaseTest::setUp

Same name in other branches
  1. 10 core/modules/views/tests/src/Unit/Plugin/views/field/LinkBaseTest.php \Drupal\Tests\views\Unit\Plugin\views\field\LinkBaseTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/views/tests/src/Unit/Plugin/views/field/LinkBaseTest.php, line 32

Class

LinkBaseTest
@coversDefaultClass \Drupal\views\Plugin\views\field\EntityLink @group Views

Namespace

Drupal\Tests\views\Unit\Plugin\views\field

Code

protected function setUp() : void {
    parent::setUp();
    $this->setUpMockLoggerWithMissingEntity();
    $container = \Drupal::getContainer();
    $container->set('string_translation', $this->createMock(TranslationInterface::class));
    $container->set('renderer', $this->createMock(RendererInterface::class));
    \Drupal::setContainer($container);
}

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