function ContactLinkTest::setUp

Same name in this branch
  1. 10 core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php \Drupal\Tests\contact\Functional\Views\ContactLinkTest::setUp()
Same name in other branches
  1. 9 core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php \Drupal\Tests\contact\Functional\Views\ContactLinkTest::setUp()
  2. 8.9.x core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php \Drupal\Tests\contact\Functional\Views\ContactLinkTest::setUp()
  3. 11.x core/modules/contact/tests/src/Unit/ContactLinkTest.php \Drupal\Tests\contact\Unit\ContactLinkTest::setUp()
  4. 11.x core/modules/contact/tests/src/Functional/Views/ContactLinkTest.php \Drupal\Tests\contact\Functional\Views\ContactLinkTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/contact/tests/src/Unit/ContactLinkTest.php, line 30

Class

ContactLinkTest
@coversDefaultClass \Drupal\contact\Plugin\views\field\ContactLink @group contact

Namespace

Drupal\Tests\contact\Unit

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.