Skip to content
Snippets Groups Projects
Commit 952cb0b1 authored by catch's avatar catch
Browse files

Issue #3293288 by Spokje, alexpott, longwave, quietone: Remove the /core/modules/simpletest folder

(cherry picked from commit 0586c531)
parent b9adafa4
Branches
Tags
24 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!4350Issue #3307718: Implement xxHash for non-cryptographic use-cases,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons,!3494Issue #3327018 by Spokje, longwave, xjm, mondrake: Update PHPStan to 1.9.3 and...,!3410Issue #3340128: UserLoginForm::submitForm has some dead code,!3389Issue #3325184 by Spokje, andypost, xjm, smustgrave: $this->configFactory is...,!3381Issue #3332363: Refactor Claro's menus-and-lists stylesheet,!3307Issue #3326193: CKEditor 5 can grow past the viewport when there is a lot of content,!3236Issue #3332419: Refactor Claro's messages stylesheet,!3231Draft: Issue #3049525 by longwave, fougere, larowlan, kim.pepper, AaronBauman, Wim...,!3212Issue #3294003: Refactor Claro's entity-meta stylesheet,!3194Issue #3330981: Fix PHPStan L1 error "Relying on entity queries to check access by default is deprecated...",!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!3024Issue #3307509: Empty option for views bulk form,!2972Issue #1845004: Replace custom password hashing library with PHP 5.5 password_hash(),!2719Issue #3110137: Remove Classy from core.,!2688Issue #3261452: [PP-1] Remove tracker module from core,!2437Issue #3238257 by hooroomoo, Wim Leers: Fragment link pointing to <textarea>...,!2296Issue #3100732: Allow specifying `meta` data on JSON:API objects,!1626Issue #3256642: Make life better for database drivers that extend another database driver
......@@ -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);
}
......
......@@ -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();
}
......@@ -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');
......
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
<?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.
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment