diff --git a/core/tests/Drupal/Tests/Component/Plugin/Factory/DefaultFactoryTest.php b/core/tests/Drupal/Tests/Component/Plugin/Factory/DefaultFactoryTest.php index 7114a6e..d3fc380 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Factory/DefaultFactoryTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Factory/DefaultFactoryTest.php @@ -48,12 +48,14 @@ protected function setUp() { } /** - * Tests the getPluginClass method. + * Tests the createInstance method. * * @see \Drupal\Component\Plugin\DefaultFactory::getPluginClass - * @dataProvider providerTestGetPluginClass + * @see \Drupal\Component\Plugin\DefaultFactory::createInstance + * + * @dataProvider providerTestCreateInstance */ - public function testGetPluginClass($plugin_id, $plugin_definition) { + public function testCreateInstance($plugin_id, $plugin_definition) { $this->discovery->expects($this->once()) ->method('getDefinition') ->with($plugin_id) @@ -71,9 +73,9 @@ public function testGetPluginClass($plugin_id, $plugin_definition) { * @return array * An array of plugin IDs and plugin definitions. * - * @see self::testGetPluginClassWithInvalidInput + * @see self::testCreateInstanceWithInvalidInput */ - public function providerTestGetPluginClass() { + public function providerTestCreateInstance() { return array( array('apple', array('class' => '\Drupal\plugin_test\Plugin\plugin_test\fruit\Apple')), array('banana', array('class' => '\Drupal\plugin_test\Plugin\plugin_test\fruit\Banana')), @@ -84,9 +86,9 @@ public function providerTestGetPluginClass() { * Tests the getPluginClass method with invalid input. * * @expectedException \Drupal\Component\Plugin\Exception\PluginException - * @dataProvider providerTestGetPluginClassWithInvalidInput + * @dataProvider providerTestCreateInstanceWithInvalidInput */ - public function testGetPluginClassWithInvalidInput($plugin_id, $plugin_definition) { + public function testCreateInstanceWithInvalidInput($plugin_id, $plugin_definition) { $this->discovery->expects($this->once()) ->method('getDefinition') ->with($plugin_id) @@ -101,9 +103,9 @@ public function testGetPluginClassWithInvalidInput($plugin_id, $plugin_definitio * @return array * An array of plugin IDs and plugin definitions. * - * @see self::testGetPluginClassWithInvalidInput + * @see self::testCreateInstanceWithInvalidInput */ - public function providerTestGetPluginClassWithInvalidInput() { + public function providerTestCreateInstanceWithInvalidInput() { return array( // Provide no class definition. array('rasperry', array()),