EntityMatcherDeriverTest.php in Linkit 8.5
File
tests/src/Kernel/EntityMatcherDeriverTest.php
View source
<?php
namespace Drupal\Tests\linkit\Kernel;
class EntityMatcherDeriverTest extends LinkitKernelTestBase {
public static $modules = [
'block',
'block_content',
'node',
'field',
];
protected $manager;
protected function setUp() {
parent::setUp();
$this
->installConfig([
'block_content',
]);
$this
->installEntitySchema('block_content');
$this
->installEntitySchema('node');
$this
->installConfig([
'field',
'node',
]);
$this->manager = $this->container
->get('plugin.manager.linkit.matcher');
}
public function testDeriver() {
$definition = $this->manager
->getDefinition('entity:block_content', FALSE);
$this
->assertNull($definition);
$definition = $this->manager
->getDefinition('entity:node', FALSE);
$this
->assertNotNull($definition);
}
}