You are here

public function FileEntityDealerTest::testFileEntityDealerManager in Media Migration 8

Tests the file entity dealer manager.

@dataProvider providerTestFileEntityDealer

Parameters

string $type: The incoming file entity type ID.

string $scheme: The scheme of the actual file entity.

File

tests/src/Kernel/Plugin/FileEntityDealerTest.php, line 42

Class

FileEntityDealerTest
Tests the file entity dealer manager and the plugin instances.

Namespace

Drupal\Tests\media_migration\Kernel\Plugin

Code

public function testFileEntityDealerManager(string $type, string $scheme) {
  $dealer = $this->container
    ->get('plugin.manager.file_entity_dealer');
  $this
    ->assertInstanceOf(FileEntityDealerManagerInterface::class, $dealer);
  assert($dealer instanceof FileEntityDealerManagerInterface);
  $plugin_instance = $dealer
    ->createInstanceFromTypeAndScheme($type, $scheme);
  $this
    ->assertInstanceOf(FileEntityDealerPluginInterface::class, $plugin_instance);
}