diff -u b/core/modules/migrate/tests/src/MigrateSqlSourceTestCase.php b/core/modules/migrate/tests/src/MigrateSqlSourceTestCase.php --- b/core/modules/migrate/tests/src/MigrateSqlSourceTestCase.php +++ b/core/modules/migrate/tests/src/MigrateSqlSourceTestCase.php @@ -79,7 +79,7 @@ ->method('getHighwater') ->will($this->returnValue(static::ORIGINAL_HIGHWATER)); // Need the test class, not the original because we need a setDatabase method. This is not pretty :/ - $plugin_class = preg_replace('/^(Drupal\\\\\w+\\\\)Plugin\\\\migrate(\\\\source(\\\\.+)?\\\\)([^\\\\]+)$/', '\1Tests\2Test\4', static::PLUGIN_CLASS); + $plugin_class = preg_replace('/^Drupal\\\\(\w+)\\\\Plugin\\\\migrate(\\\\source(\\\\.+)?\\\\)([^\\\\]+)$/', 'Drupal\\Tests\\\$1$2Test$4', static::PLUGIN_CLASS); $plugin = new $plugin_class($this->migrationConfiguration['source'], $this->migrationConfiguration['source']['plugin'], array(), $migration); $plugin->setDatabase($this->getDatabase($this->databaseContents + array('test_map' => array()))); $plugin->setModuleHandler($module_handler); diff -u b/core/modules/views/tests/src/Plugin/field/CounterTest.php b/core/modules/views/tests/src/Plugin/field/CounterTest.php --- b/core/modules/views/tests/src/Plugin/field/CounterTest.php +++ b/core/modules/views/tests/src/Plugin/field/CounterTest.php @@ -12,7 +12,7 @@ use Drupal\views\Entity\View; use Drupal\views\Plugin\views\field\Counter; use Drupal\views\ResultRow; -use Drupal\Tests\views\ViewTestData; +use Drupal\views\Tests\ViewTestData; /** * Tests the counter field plugin. diff -u b/core/modules/views/tests/src/PluginBaseTest.php b/core/modules/views/tests/src/PluginBaseTest.php --- b/core/modules/views/tests/src/PluginBaseTest.php +++ b/core/modules/views/tests/src/PluginBaseTest.php @@ -8,7 +8,7 @@ namespace Drupal\Tests\views; use Drupal\Tests\UnitTestCase; -use Drupal\Tests\views\TestHelperPlugin; +use Drupal\views\Tests\TestHelperPlugin; /** * Tests code of the views plugin base class. @@ -20,7 +20,7 @@ /** * The test helper plugin to use for the tests. * - * @var \Drupal\Tests\views\TestHelperPlugin + * @var \Drupal\views\Tests\TestHelperPlugin */ protected $testHelperPlugin; diff -u b/core/modules/views/tests/src/ViewsDataHelperTest.php b/core/modules/views/tests/src/ViewsDataHelperTest.php --- b/core/modules/views/tests/src/ViewsDataHelperTest.php +++ b/core/modules/views/tests/src/ViewsDataHelperTest.php @@ -10,6 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Tests\UnitTestCase; use Drupal\views\ViewsDataHelper; +use Drupal\views\Tests\ViewTestData; /** * Tests the views data helper class. diff -u b/core/modules/views/tests/src/ViewsDataTest.php b/core/modules/views/tests/src/ViewsDataTest.php --- b/core/modules/views/tests/src/ViewsDataTest.php +++ b/core/modules/views/tests/src/ViewsDataTest.php @@ -10,6 +10,7 @@ use Drupal\Core\Language\Language; use Drupal\Tests\UnitTestCase; use Drupal\views\ViewsData; +use Drupal\views\Tests\ViewTestData; /** * Tests the fetching of views data. only in patch2: unchanged: --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -577,8 +577,7 @@ function simpletest_classloader_register() { foreach ($types as $type) { foreach ($extensions[$type] as $name => $uri) { drupal_classloader_register($name, dirname($uri)); - $classloader->addPsr4('Drupal\\' . $name . '\\Tests\\', array( - DRUPAL_ROOT . '/' . dirname($uri) . '/tests/Drupal/' . $name . '/Tests', + $classloader->addPsr4('Drupal\\Tests\\' . $name . '\\', array( DRUPAL_ROOT . '/' . dirname($uri) . '/tests/src', )); // While being there, prime drupal_get_filename(). only in patch2: unchanged: --- a/core/tests/bootstrap.php +++ b/core/tests/bootstrap.php @@ -62,7 +62,7 @@ function drupal_phpunit_register_extension_dirs(Composer\Autoload\ClassLoader $l } if (is_dir($dir . '/tests/src')) { // Register the PSR-4 directory for PHPUnit test classes. - $loader->addPsr4('Drupal\\' . $extension . '\Tests\\', $dir . '/tests/src'); + $loader->addPsr4('Drupal\\Tests\\' . $extension . '\\', $dir . '/tests/src'); } } }