You are here

public function EntityEmbedDetectorTest::testCreate in Lingotek Translation 3.5.x

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

@covers ::create

File

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

Class

EntityEmbedDetectorTest
Unit test for the entity_embed 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.repository',
  ], [
    'entity_field.manager',
  ], [
    'lingotek.configuration',
  ])
    ->willReturnOnConsecutiveCalls($this->entityRepository, $this->entityFieldManager, $this->lingotekConfiguration);
  $detector = EntityEmbedDetector::create($container, [], 'entity_embed_detector', []);
  $this
    ->assertNotNull($detector);
}