function LinkApproveTest::setUp

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

Overrides UnitTestCase::setUp

File

core/modules/comment/tests/src/Unit/Plugin/views/field/LinkApproveTest.php, line 30

Class

LinkApproveTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21comment%21src%21Plugin%21views%21field%21LinkApprove.php/class/LinkApprove/11.x" title="Provides a comment approve link." class="local">\Drupal\comment\Plugin\views\field\LinkApprove</a> @group comment

Namespace

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

Code

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

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