You are here

public function FieldLinkDetectorTest::testCreate in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Unit/Plugin/RelatedEntitiesDetector/FieldLinkDetectorTest.php \Drupal\Tests\lingotek\Unit\Plugin\RelatedEntitiesDetector\FieldLinkDetectorTest::testCreate()
  2. 3.5.x tests/src/Unit/Plugin/RelatedEntitiesDetector/FieldLinkDetectorTest.php \Drupal\Tests\lingotek\Unit\Plugin\RelatedEntitiesDetector\FieldLinkDetectorTest::testCreate()
  3. 3.6.x tests/src/Unit/Plugin/RelatedEntitiesDetector/FieldLinkDetectorTest.php \Drupal\Tests\lingotek\Unit\Plugin\RelatedEntitiesDetector\FieldLinkDetectorTest::testCreate()
  4. 3.7.x tests/src/Unit/Plugin/RelatedEntitiesDetector/FieldLinkDetectorTest.php \Drupal\Tests\lingotek\Unit\Plugin\RelatedEntitiesDetector\FieldLinkDetectorTest::testCreate()

@covers ::create

File

tests/src/Unit/Plugin/RelatedEntitiesDetector/FieldLinkDetectorTest.php, line 100

Class

FieldLinkDetectorTest
Unit test for the html links entity detector plugin.

Namespace

Drupal\Tests\lingotek\Unit\Plugin\RelatedEntitiesDetector

Code

public function testCreate() {
  $container = $this
    ->createMock(ContainerInterface::class);
  $container
    ->expects($this
    ->exactly(3))
    ->method('get')
    ->withConsecutive([
    'entity_type.manager',
  ], [
    'entity_field.manager',
  ], [
    'lingotek.configuration',
  ])
    ->willReturnOnConsecutiveCalls($this->entityTypeManager, $this->entityFieldManager, $this->lingotekConfiguration);
  $detector = FieldLinkDetector::create($container, [], 'field_link_detector', []);
  $this
    ->assertNotNull($detector);
}