public function DefaultPluginManagerTest::providerTestProcessDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::providerTestProcessDefinition()
- 9 core/tests/Drupal/Tests/Core/Plugin/DefaultPluginManagerTest.php \Drupal\Tests\Core\Plugin\DefaultPluginManagerTest::providerTestProcessDefinition()
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultPluginManagerTest.php, line 413
Class
- DefaultPluginManagerTest
- Tests the DefaultPluginManager.
Namespace
Drupal\Tests\Core\PluginCode
public function providerTestProcessDefinition() {
$data = [];
$data['merge'][] = [
'foo' => [
'bar' => [
'asdf',
],
],
];
$data['merge'][] = [
'foo' => [
'bar' => [
'baz',
'asdf',
],
],
];
$object_definition = (object) [
'foo' => [
'bar' => [
'asdf',
],
],
];
$data['object_definition'] = [
$object_definition,
clone $object_definition,
];
$data['no_form'][] = [
'class' => TestPluginForm::class,
];
$data['no_form'][] = [
'class' => TestPluginForm::class,
'foo' => [
'bar' => [
'baz',
],
],
];
$data['default_form'][] = [
'class' => TestPluginForm::class,
'forms' => [
'configure' => 'stdClass',
],
];
$data['default_form'][] = [
'class' => TestPluginForm::class,
'forms' => [
'configure' => 'stdClass',
],
'foo' => [
'bar' => [
'baz',
],
],
];
$data['class_with_slashes'][] = [
'class' => '\\Drupal\\Tests\\Core\\Plugin\\TestPluginForm',
];
$data['class_with_slashes'][] = [
'class' => 'Drupal\\Tests\\Core\\Plugin\\TestPluginForm',
'foo' => [
'bar' => [
'baz',
],
],
];
$data['object_with_class_with_slashes'][] = (new PluginDefinition())
->setClass('\\Drupal\\Tests\\Core\\Plugin\\TestPluginForm');
$data['object_with_class_with_slashes'][] = (new PluginDefinition())
->setClass('Drupal\\Tests\\Core\\Plugin\\TestPluginForm');
return $data;
}