diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 97caa11..b962534 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -725,7 +725,7 @@ function simpletest_phpunit_get_available_tests() { $test_classes = array(); foreach ($test_suite AS $test) { $name = get_class($test); - if (!array_key_exists($name, $test_classes)) { + if (!array_key_exists($name, $test_classes) && method_exists($test, 'getInfo')) { $test_classes[$name] = $test->getInfo(); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Plugin/ContextPluginTest.php b/core/modules/system/lib/Drupal/system/Tests/Plugin/ContextPluginTest.php index 882ae96..5d5fb63 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Plugin/ContextPluginTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Plugin/ContextPluginTest.php @@ -104,10 +104,10 @@ function testContext() { $this->assertEqual($user->label(), $plugin->getTitle()); // Test the getContextDefinitions() method. - $this->assertIdentical($plugin->getContextDefinitions(), array('user' => array('class' => 'Drupal\user\Plugin\Core\Entity\User'))); + $this->assertIdentical($plugin->getContextDefinitions(), array('user' => array('class' => 'Drupal\user\UserInterface'))); // Test the getContextDefinition() method for a valid context. - $this->assertEqual($plugin->getContextDefinition('user'), array('class' => 'Drupal\user\Plugin\Core\Entity\User')); + $this->assertEqual($plugin->getContextDefinition('user'), array('class' => 'Drupal\user\UserInterface')); // Test the getContextDefinition() method for an invalid context. try { diff --git a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php index 157e583..a897160 100644 --- a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php +++ b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php @@ -72,7 +72,7 @@ public function __construct() { 'label' => t('User name'), 'class' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserNameBlock', 'context' => array( - 'user' => array('class' => 'Drupal\user\Plugin\Core\Entity\User') + 'user' => array('class' => 'Drupal\user\UserInterface') ), )); @@ -90,7 +90,7 @@ public function __construct() { 'label' => t('Complex context'), 'class' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockComplexContextBlock', 'context' => array( - 'user' => array('class' => 'Drupal\user\Plugin\Core\Entity\User'), + 'user' => array('class' => 'Drupal\user\UserInterface'), 'node' => array('class' => 'Drupal\Core\Entity\EntityBCDecorator'), ), ));