WorkbenchAccessDerivativeDiscoveryTest.php in Workbench Access 8
File
tests/src/Kernel/WorkbenchAccessDerivativeDiscoveryTest.php
View source
<?php
namespace Drupal\Tests\workbench_access\Kernel;
use Drupal\KernelTests\KernelTestBase;
class WorkbenchAccessDerivativeDiscoveryTest extends KernelTestBase {
protected static $modules = [
'workbench_access',
'workbench_access_test',
'entity_test',
'system',
'user',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('entity_test');
}
public function testDerivativeDiscovery() {
$manager = $this->container
->get('plugin.manager.workbench_access.scheme');
foreach ($manager
->getDefinitions() as $id => $name) {
$this
->assertNotNull($manager
->createInstance($id));
}
}
}