Commit ca81e990 authored by alexpott's avatar alexpott

Issue #2504995 by Xano: Component DefaultFactory relies on core's concept of plugin providers

parent bff29173
......@@ -88,7 +88,7 @@ public static function getPluginClass($plugin_id, $plugin_definition = NULL, $re
}
if ($required_interface && !is_subclass_of($plugin_definition['class'], $required_interface)) {
throw new PluginException(sprintf('Plugin "%s" (%s) in %s should implement interface %s.', $plugin_id, $plugin_definition['class'], $plugin_definition['provider'], $required_interface));
throw new PluginException(sprintf('Plugin "%s" (%s) must implement interface %s.', $plugin_id, $plugin_definition['class'], $required_interface));
}
return $class;
......
......@@ -60,7 +60,7 @@ public function testGetPluginClassWithInterface() {
* Tests getPluginClass() with a required interface but no implementation.
*
* @expectedException \Drupal\Component\Plugin\Exception\PluginException
* @expectedExceptionMessage Plugin "cherry" (Drupal\plugin_test\Plugin\plugin_test\fruit\Kale) in core should implement interface \Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface.
* @expectedExceptionMessage Plugin "cherry" (Drupal\plugin_test\Plugin\plugin_test\fruit\Kale) must implement interface \Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface.
*/
public function testGetPluginClassWithInterfaceAndInvalidClass() {
$plugin_class = 'Drupal\plugin_test\Plugin\plugin_test\fruit\Kale';
......
......@@ -251,7 +251,7 @@ public function testCreateInstanceWithJustValidInterfaces() {
* @covers ::createInstance
*
* @expectedException \Drupal\Component\Plugin\Exception\PluginException
* @expectedExceptionMessage Plugin "kale" (Drupal\plugin_test\Plugin\plugin_test\fruit\Kale) in plugin_test should implement interface \Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface
* @expectedExceptionMessage Plugin "kale" (Drupal\plugin_test\Plugin\plugin_test\fruit\Kale) must implement interface \Drupal\plugin_test\Plugin\plugin_test\fruit\FruitInterface
*/
public function testCreateInstanceWithInvalidInterfaces() {
$module_handler = $this->getMock('Drupal\Core\Extension\ModuleHandlerInterface');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment