public function ServiceContainerCToolsIntegrationTest::testCToolsPluginTypes in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/service_container/Tests/ServiceContainerCToolsIntegrationTest.php \Drupal\service_container\Tests\ServiceContainerCToolsIntegrationTest::testCToolsPluginTypes()
Tests if CTools plugin types are available as services.
File
- lib/
Drupal/ service_container/ Tests/ ServiceContainerCToolsIntegrationTest.php, line 37 - Contains \Drupal\service_container\Tests\ServiceContainerCToolsIntegrationTest.
Class
Namespace
Drupal\service_container\TestsCode
public function testCToolsPluginTypes() {
foreach (ctools_plugin_get_plugin_type_info() as $module_name => $plugins) {
if ($module_name != 'service_container_test_ctools') {
continue;
}
foreach ($plugins as $plugin_type => $plugin_data) {
$services = array();
$services[$module_name . '.' . $plugin_type] = TRUE;
$services[$module_name . '.' . Container::underscore($plugin_type)] = TRUE;
foreach ($services as $service => $value) {
$this
->assertTrue($this->container
->has($service), "Container has plugin manager {$service} for {$module_name} / {$plugin_type}.");
}
}
}
}