protected function DefaultPluginManagerTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 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';
}