public function PluginManagerTest::testDefinitions in Purge 8.3
Same name in this branch
- 8.3 tests/src/Kernel/Purger/PluginManagerTest.php \Drupal\Tests\purge\Kernel\Purger\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/Processor/PluginManagerTest.php \Drupal\Tests\purge\Kernel\Processor\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/Queue/PluginManagerTest.php \Drupal\Tests\purge\Kernel\Queue\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/Invalidation/PluginManagerTest.php \Drupal\Tests\purge\Kernel\Invalidation\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/TagsHeader/PluginManagerTest.php \Drupal\Tests\purge\Kernel\TagsHeader\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/Queuer/PluginManagerTest.php \Drupal\Tests\purge\Kernel\Queuer\PluginManagerTest::testDefinitions()
- 8.3 tests/src/Kernel/DiagnosticCheck/PluginManagerTest.php \Drupal\Tests\purge\Kernel\DiagnosticCheck\PluginManagerTest::testDefinitions()
Test the plugins we expect to be available.
File
- tests/
src/ Kernel/ TagsHeader/ PluginManagerTest.php, line 52
Class
Namespace
Drupal\Tests\purge\Kernel\TagsHeaderCode
public function testDefinitions() : void {
$definitions = $this->pluginManager
->getDefinitions();
foreach ($this->plugins as $plugin_id) {
$this
->assertTrue(isset($definitions[$plugin_id]));
}
foreach ($definitions as $plugin_id => $md) {
$this
->assertTrue(in_array($plugin_id, $this->plugins));
}
foreach ($definitions as $plugin_id => $md) {
foreach ($md as $field => $value) {
$this
->assertTrue(in_array($field, $this->annotationFields));
}
foreach ($this->annotationFields as $field) {
$this
->assertTrue(isset($md[$field]));
}
}
}