You are here

protected function BuiltinTest::setUp in Freelinking 8.3

Same name and namespace in other branches
  1. 4.0.x tests/src/Unit/Plugin/freelinking/BuiltinTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\BuiltinTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Plugin/freelinking/BuiltinTest.php, line 54

Class

BuiltinTest
Tests the freelinking builtin plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

protected function setUp() {

  // Mock string translation service.
  $tProphet = $this
    ->prophesize('\\Drupal\\Core\\StringTranslation\\TranslationInterface');
  $tProphet
    ->translateString(Argument::any())
    ->willReturn('Redact, show text only, or display the indicator');
  $this->translationInterfaceMock = $tProphet
    ->reveal();
  $container = new ContainerBuilder();
  $container
    ->set('string_translation', $tProphet
    ->reveal());
  \Drupal::setContainer($container);
}