diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php index 65703b6..7c151c0 100644 --- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php @@ -21,7 +21,7 @@ class CategorizingPluginManagerTraitTest extends UnitTestCase { /** * The plugin manager to test. * - * @var \Drupal\Component\Plugin\CategorizingPluginManagerInterface | \PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Component\Plugin\CategorizingPluginManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $pluginManager; @@ -39,7 +39,7 @@ protected function setUp() { public function testGetCategories() { $this->assertSame(array_values($this->pluginManager->getCategories()), [ 'fruits', - 'vegetables' + 'vegetables', ]); } @@ -66,27 +66,27 @@ public function testGetGroupedDefinitions() { */ public function testProcessDefinitionCategory() { // Existing category. - $definition = array( + $definition = [ 'label' => 'some', 'provider' => 'core', 'category' => 'bag', - ); + ]; $this->pluginManager->processDefinition($definition, 'some'); $this->assertSame($definition['category'], 'bag'); // No category, provider without label. - $definition = array( + $definition = [ 'label' => 'some', 'provider' => 'core', - ); + ]; $this->pluginManager->processDefinition($definition, 'some'); $this->assertSame($definition['category'], 'core'); // No category, provider is module with label. - $definition = array( + $definition = [ 'label' => 'some', 'provider' => 'node', - ); + ]; $this->pluginManager->processDefinition($definition, 'some'); $this->assertSame($definition['category'], 'Node'); } @@ -106,24 +106,24 @@ public function __construct() { } /** - * Implements getDefinitions() for the trait to provide some test definitions. + * {@inheritdoc} * - * @return array + * Provides some test definitions to the trait. */ public function getDefinitions() { return [ - 'cucumber' => array( + 'cucumber' => [ 'label' => 'cucumber', 'category' => 'vegetables', - ), - 'apple' => array( + ], + 'apple' => [ 'label' => 'apple', 'category' => 'fruits', - ), - 'mango' => array( + ], + 'mango' => [ 'label' => 'mango', 'category' => 'fruits', - ), + ], ]; } @@ -145,7 +145,7 @@ public function processDefinition(&$definition, $plugin_id) { if (!function_exists('system_get_info')) { function system_get_info($type, $name = NULL) { - return array('node' => array('name' => 'Node')); + return ['node' => ['name' => 'Node']]; } } }