function DefaultPluginManagerTest::setUp
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultPluginManagerTest.php, line 40
Class
- DefaultPluginManagerTest
- Tests the DefaultPluginManager.
Namespace
Drupal\Tests\Core\PluginCode
protected function setUp() {
$this->expectedDefinitions = [
'apple' => [
'id' => 'apple',
'label' => 'Apple',
'color' => 'green',
'class' => 'Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\Apple',
],
'banana' => [
'id' => 'banana',
'label' => 'Banana',
'color' => 'yellow',
'uses' => [
'bread' => 'Banana bread',
'loaf' => [
'singular' => '@count loaf',
'plural' => '@count loaves',
],
],
'class' => 'Drupal\\plugin_test\\Plugin\\plugin_test\\fruit\\Banana',
],
];
$this->namespaces = new \ArrayObject();
$this->namespaces['Drupal\\plugin_test'] = $this->root . '/core/modules/system/tests/modules/plugin_test/src';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.