Loading core/modules/file/tests/src/Kernel/Migrate/d6/FileMigrationTestTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ protected function prepareMigration(MigrationInterface $migration) { if ($destination['plugin'] === 'entity:file') { // Make sure we have a single trailing slash. $source = $migration->getSourceConfiguration(); $source['site_path'] = 'core/modules/simpletest'; $source['site_path'] = 'core/tests/fixtures'; $source['constants']['source_base_path'] = $this->root . '/'; $migration->set('source', $source); } Loading core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php +11 −4 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ class MigrateFileTest extends MigrateDrupal6TestBase implements MigrateDumpAlter protected function setUp(): void { parent::setUp(); // Remove the file_directory_path to test site_path setting. // @see \Drupal\Tests\file\Kernel\Migrate\d6\FileMigrationTestTrait::prepareMigration() Database::getConnection('default', 'migrate') ->delete('variable') ->condition('name', 'file_directory_path') ->execute(); $this->setUpMigratedFiles(); } Loading Loading @@ -97,11 +104,11 @@ public function testFiles() { ->truncate($map_table) ->execute(); // Update the file_directory_path. // Set the file_directory_path. Database::getConnection('default', 'migrate') ->update('variable') ->fields(['value' => serialize('files/test')]) ->condition('name', 'file_directory_path') ->insert('variable') ->fields(['name', 'value']) ->values(['name' => 'file_directory_path', 'value' => serialize('files/test')]) ->execute(); $this->executeMigration('d6_file'); Loading core/modules/simpletest/simpletest.info.ymldeleted 100644 → 0 +0 −8 Original line number Diff line number Diff line name: Testing type: module description: 'Obsolete. SimpleTest has been removed from core.' lifecycle: obsolete lifecycle_link: 'https://www.drupal.org/about/core/policies/core-change-policies/deprecated-and-obsolete-modules-and-themes#s-simpletest' package: Core version: VERSION hidden: true core/modules/simpletest/simpletest.installdeleted 100644 → 0 +0 −52 Original line number Diff line number Diff line <?php /** * @file * Uninstall functions for the simpletest module. */ use Drupal\Core\Database\Database; use Drupal\Core\File\Exception\FileException; use Drupal\Core\Test\EnvironmentCleaner; use Drupal\Core\Test\TestDatabase; use Symfony\Component\Console\Output\NullOutput; /** * Implements hook_schema(). */ function simpletest_schema() { return TestDatabase::testingSchema(); } /** * Implements hook_uninstall(). */ function simpletest_uninstall() { // Do not clean the environment in case the Simpletest module is uninstalled // in a (recursive) test for itself, since EnvironmentCleaner would also // delete the test site of the parent test process. if (!drupal_valid_test_ua()) { // Clean up left-over tables and directories. $cleaner = new EnvironmentCleaner( DRUPAL_ROOT, Database::getConnection(), TestDatabase::getConnection(), new NullOutput(), \Drupal::service('file_system') ); try { $cleaner->cleanEnvironment(); } catch (Exception $e) { // Ignore. } } // Delete verbose test output and any other testing framework files. try { \Drupal::service('file_system')->deleteRecursive('public://simpletest'); } catch (FileException $e) { // Ignore. } } Loading
core/modules/file/tests/src/Kernel/Migrate/d6/FileMigrationTestTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ protected function prepareMigration(MigrationInterface $migration) { if ($destination['plugin'] === 'entity:file') { // Make sure we have a single trailing slash. $source = $migration->getSourceConfiguration(); $source['site_path'] = 'core/modules/simpletest'; $source['site_path'] = 'core/tests/fixtures'; $source['constants']['source_base_path'] = $this->root . '/'; $migration->set('source', $source); } Loading
core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php +11 −4 Original line number Diff line number Diff line Loading @@ -31,6 +31,13 @@ class MigrateFileTest extends MigrateDrupal6TestBase implements MigrateDumpAlter protected function setUp(): void { parent::setUp(); // Remove the file_directory_path to test site_path setting. // @see \Drupal\Tests\file\Kernel\Migrate\d6\FileMigrationTestTrait::prepareMigration() Database::getConnection('default', 'migrate') ->delete('variable') ->condition('name', 'file_directory_path') ->execute(); $this->setUpMigratedFiles(); } Loading Loading @@ -97,11 +104,11 @@ public function testFiles() { ->truncate($map_table) ->execute(); // Update the file_directory_path. // Set the file_directory_path. Database::getConnection('default', 'migrate') ->update('variable') ->fields(['value' => serialize('files/test')]) ->condition('name', 'file_directory_path') ->insert('variable') ->fields(['name', 'value']) ->values(['name' => 'file_directory_path', 'value' => serialize('files/test')]) ->execute(); $this->executeMigration('d6_file'); Loading
core/modules/simpletest/simpletest.info.ymldeleted 100644 → 0 +0 −8 Original line number Diff line number Diff line name: Testing type: module description: 'Obsolete. SimpleTest has been removed from core.' lifecycle: obsolete lifecycle_link: 'https://www.drupal.org/about/core/policies/core-change-policies/deprecated-and-obsolete-modules-and-themes#s-simpletest' package: Core version: VERSION hidden: true
core/modules/simpletest/simpletest.installdeleted 100644 → 0 +0 −52 Original line number Diff line number Diff line <?php /** * @file * Uninstall functions for the simpletest module. */ use Drupal\Core\Database\Database; use Drupal\Core\File\Exception\FileException; use Drupal\Core\Test\EnvironmentCleaner; use Drupal\Core\Test\TestDatabase; use Symfony\Component\Console\Output\NullOutput; /** * Implements hook_schema(). */ function simpletest_schema() { return TestDatabase::testingSchema(); } /** * Implements hook_uninstall(). */ function simpletest_uninstall() { // Do not clean the environment in case the Simpletest module is uninstalled // in a (recursive) test for itself, since EnvironmentCleaner would also // delete the test site of the parent test process. if (!drupal_valid_test_ua()) { // Clean up left-over tables and directories. $cleaner = new EnvironmentCleaner( DRUPAL_ROOT, Database::getConnection(), TestDatabase::getConnection(), new NullOutput(), \Drupal::service('file_system') ); try { $cleaner->cleanEnvironment(); } catch (Exception $e) { // Ignore. } } // Delete verbose test output and any other testing framework files. try { \Drupal::service('file_system')->deleteRecursive('public://simpletest'); } catch (FileException $e) { // Ignore. } }