diff --git a/core/assets/scaffold/files/example.gitignore b/core/assets/scaffold/files/example.gitignore index 7cc32279748468fbb29ced225faccf662539a63d..d77a48bc88649d6621b8b2221dfda3b7bec77d92 100644 --- a/core/assets/scaffold/files/example.gitignore +++ b/core/assets/scaffold/files/example.gitignore @@ -25,7 +25,7 @@ sites/*/services*.yml sites/*/files sites/*/private -# Ignore SimpleTest multi-site environment. +# Ignore multi-site test environment. sites/simpletest # If you prefer to store your .gitignore file in the sites/ folder, comment @@ -38,5 +38,5 @@ sites/simpletest # */files # */private -# Ignore SimpleTest multi-site environment. +# Ignore multi-site test environment. # simpletest diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 03af0c0a866525a6bc1a89db204a0645cefc14f4..ec0196087c56bc09eba40d4c1834feea2415d45e 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -201,7 +201,7 @@ function _drupal_exception_handler_additional($exception, $exception2) { } /** - * Returns the test prefix if this is an internal request from SimpleTest. + * Returns the test prefix if this is an internal request from a test. * * @param string $new_prefix * Internal use only. A new prefix to be stored. @@ -224,9 +224,8 @@ function drupal_valid_test_ua($new_prefix = NULL) { // a test environment. $test_prefix = FALSE; - // A valid Simpletest request will contain a hashed and salted authentication - // code. Check if this code is present in a cookie or custom user agent - // string. + // A valid test request will contain a hashed and salted authentication code. + // Check if this code is present in a cookie or custom user agent string. $http_user_agent = $_SERVER['HTTP_USER_AGENT'] ?? NULL; $user_agent = $_COOKIE['SIMPLETEST_USER_AGENT'] ?? $http_user_agent; if (isset($user_agent) && preg_match("/^simple(\w+\d+):(.+):(.+):(.+)$/", $user_agent, $matches)) { @@ -268,7 +267,7 @@ function drupal_valid_test_ua($new_prefix = NULL) { } /** - * Generates a user agent string with a HMAC and timestamp for simpletest. + * Generates a user agent string with a HMAC and timestamp for tests. */ function drupal_generate_test_ua($prefix) { static $key, $last_prefix; diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php index 4842b0d990bfed2d05738bb32a0fde85bf36a692..525d951cd924b58f27d8aa88c8db0fb5ca946bcf 100644 --- a/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -29,7 +29,7 @@ class DbDumpCommand extends DbCommandBase { /** * An array of table patterns to exclude completely. * - * This excludes any lingering simpletest tables generated during test runs. + * This excludes any lingering tables generated during test runs. * * @var array */ diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index e992b77bcea68a722f0b0944cddffb838547c2e3..0461afd5af5f365ba5f7a752be022348c7d27e5a 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -370,7 +370,7 @@ public static function findSitePath(Request $request, $require_settings = TRUE, $app_root = static::guessApplicationRoot(); } - // Check for a simpletest override. + // Check for a test override. if ($test_prefix = drupal_valid_test_ua()) { $test_db = new TestDatabase($test_prefix); return $test_db->getTestSitePath(); @@ -982,7 +982,7 @@ public static function bootEnvironment($app_root = NULL) { // Only code that interfaces directly with tests should rely on this // constant; e.g., the error/exception handler conditionally adds further // error information into HTTP response headers that are consumed by - // Simpletest's internal browser. + // the internal browser. define('DRUPAL_TEST_IN_CHILD_SITE', TRUE); // Web tests are to be conducted with runtime assertions active. diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php index 76d6f1947bd945256027a0b8d780e740a8af18bb..ce6ecbddfa5f35c259c164ba2cdd6f916ed90baa 100644 --- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php +++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php @@ -168,8 +168,8 @@ public function scan($type, $include_tests = NULL) { // expected extension type specific directory names only. $searchdirs[static::ORIGIN_ROOT] = ''; - // Simpletest uses the regular built-in multi-site functionality of Drupal - // for running web tests. As a consequence, extensions of the parent site + // Tests use the regular built-in multi-site functionality of Drupal for + // running web tests. As a consequence, extensions of the parent site // located in a different site-specific directory are not discovered in a // test site environment, because the site directories are not the same. // Therefore, add the site directory of the parent site to the search paths, diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php index 32cb051dd698512213e7cbd2651a33614af33f63..57e68e2ad3f3939e4e258d89982785641f11679a 100644 --- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php +++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php @@ -277,9 +277,9 @@ protected function prepareRequestForGenerator($clean_urls = TRUE, $override_serv $this->container->get('request_stack')->push($request); // The request context is normally set by the router_listener from within - // its KernelEvents::REQUEST listener. In the simpletest parent site this - // event is not fired, therefore it is necessary to updated the request - // context manually here. + // its KernelEvents::REQUEST listener. In the parent site this event is not + // fired, therefore it is necessary to update the request context manually + // here. $this->container->get('router.request_context')->fromRequest($request); return $request; @@ -503,7 +503,7 @@ protected function rebuildAll() { } /** - * Returns the parameters that will be used when Simpletest installs Drupal. + * Returns the parameters that will be used when the test installs Drupal. * * @see install_drupal() * @see install_state_defaults() diff --git a/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php b/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php index 51eb7b76b45639eca4746ea9537ed2e2ae06da2f..99bb449e2f07ce3fa0060ca0a5be4dce9a31ef6e 100644 --- a/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php +++ b/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php @@ -12,17 +12,15 @@ class TestHttpClientMiddleware { /** - * {@inheritdoc} - * - * HTTP middleware that replaces the user agent for simpletest requests. + * HTTP middleware that replaces the user agent for test requests. */ public function __invoke() { - // If the database prefix is being used by SimpleTest to run the tests in a copied - // database then set the user-agent header to the database prefix so that any - // calls to other Drupal pages will run the SimpleTest prefixed database. The - // user-agent is used to ensure that multiple testing sessions running at the - // same time won't interfere with each other as they would if the database - // prefix were stored statically in a file or database variable. + // If the database prefix is being used to run the tests in a copied + // database, then set the User-Agent header to the database prefix so that + // any calls to other Drupal pages will run the test-prefixed database. The + // user agent is used to ensure that multiple testing sessions running at + // the same time won't interfere with each other as they would if the + // database prefix were stored statically in a file or database variable. return function ($handler) { return function (RequestInterface $request, array $options) use ($handler) { if ($test_prefix = drupal_valid_test_ua()) { diff --git a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php index a6c27ab6a9161b372814c116a39506db4b72c71e..c257b30396ea858136504bfd2c370579cfdcd6f0 100644 --- a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php +++ b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php @@ -169,8 +169,7 @@ public function runCommand(array $unescaped_test_classnames, $phpunit_file, &$st $old_cwd = getcwd(); chdir($this->appRoot . "/core"); - // exec in a subshell so that the environment is isolated when running tests - // via the simpletest UI. + // exec in a subshell so that the environment is isolated. $ret = exec(implode(" ", $command), $output, $status); chdir($old_cwd); diff --git a/core/lib/Drupal/Core/Test/TestDatabase.php b/core/lib/Drupal/Core/Test/TestDatabase.php index 02ced56cbddc2885b3fab301cf37f5da32da5187..4041f0cc8032a71ef2a46c585c1980c86801809d 100644 --- a/core/lib/Drupal/Core/Test/TestDatabase.php +++ b/core/lib/Drupal/Core/Test/TestDatabase.php @@ -27,23 +27,22 @@ class TestDatabase { protected $databasePrefix; /** - * Returns the database connection to the site running Simpletest. + * Returns the database connection to the site under test. * * @return \Drupal\Core\Database\Connection * The database connection to use for inserting assertions. * - * @see \Drupal\simpletest\TestBase::prepareEnvironment() + * @see \Drupal\Core\Test\TestSetupTrait::getDatabaseConnection() */ public static function getConnection() { // Check whether there is a test runner connection. // @see run-tests.sh - // @todo Convert Simpletest UI runner to create + use this connection, too. try { $connection = Database::getConnection('default', 'test-runner'); } catch (ConnectionNotDefinedException $e) { // Check whether there is a backup of the original default connection. - // @see TestBase::prepareEnvironment() + // @see \Drupal\Core\Test\TestSetupTrait::changeDatabasePrefix() try { $connection = Database::getConnection('default', 'simpletest_original_default'); } @@ -185,9 +184,7 @@ protected function getLockFile($lock_id) { * This is useful for inserting assertions that can only be recorded after * the test case has been destroyed, such as PHP fatal errors. The caller * information is not automatically gathered since the caller is most likely - * inserting the assertion on behalf of other code. In all other respects - * the method behaves just like \Drupal\simpletest\TestBase::assert() in terms - * of storing the assertion. + * inserting the assertion on behalf of other code. * * @param string $test_id * The test ID to which the assertion relates. @@ -310,7 +307,7 @@ public function logRead($test_id, $test_class) { } /** - * Defines the database schema for run-tests.sh and simpletest module. + * Defines the database schema for run-tests.sh and PHPUnit tests. * * @return array * Array suitable for use in a hook_schema() implementation. @@ -319,12 +316,12 @@ public function logRead($test_id, $test_class) { */ public static function testingSchema() { $schema['simpletest'] = [ - 'description' => 'Stores simpletest messages', + 'description' => 'Stores test messages', 'fields' => [ 'message_id' => [ 'type' => 'serial', 'not null' => TRUE, - 'description' => 'Primary Key: Unique simpletest message ID.', + 'description' => 'Primary Key: Unique test message ID.', ], 'test_id' => [ 'type' => 'int', @@ -385,12 +382,12 @@ public static function testingSchema() { ], ]; $schema['simpletest_test_id'] = [ - 'description' => 'Stores simpletest test IDs, used to auto-increment the test ID so that a fresh test ID is used.', + 'description' => 'Stores test IDs, used to auto-increment the test ID so that a fresh test ID is used.', 'fields' => [ 'test_id' => [ 'type' => 'serial', 'not null' => TRUE, - 'description' => 'Primary Key: Unique simpletest ID used to group test results together. Each time a set of tests + 'description' => 'Primary Key: Unique test ID used to group test results together. Each time a set of tests are run a new test ID is used.', ], 'last_prefix' => [ diff --git a/core/lib/Drupal/Core/Test/TestKernel.php b/core/lib/Drupal/Core/Test/TestKernel.php index 124dff402b2dc4c9c34f6ede32f3e2fda31f187c..26917b4a80e1a316ab2f0030180a025866b1d122 100644 --- a/core/lib/Drupal/Core/Test/TestKernel.php +++ b/core/lib/Drupal/Core/Test/TestKernel.php @@ -5,7 +5,7 @@ use Drupal\Core\DrupalKernel; /** - * Kernel to mock requests to test simpletest. + * Kernel that is only used by mock front controllers. */ class TestKernel extends DrupalKernel { diff --git a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php index de5d3df9dbc1202d6e9cd9a3563825bf4c0aa4c1..f762e339e2473ef080971ded83339bb023e1e19a 100644 --- a/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php +++ b/core/modules/book/tests/src/Functional/BookBreadcrumbTest.php @@ -117,8 +117,8 @@ protected function createBookNode($book_nid, $parent = NULL) { static $number = 0; $edit = []; - $edit['title[0][value]'] = str_pad($number, 2, '0', STR_PAD_LEFT) . ' - SimpleTest test node ' . $this->randomMachineName(10); - $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); + $edit['title[0][value]'] = str_pad($number, 2, '0', STR_PAD_LEFT) . ' - test node ' . $this->randomMachineName(10); + $edit['body[0][value]'] = 'test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); $edit['book[bid]'] = $book_nid; if ($parent !== NULL) { diff --git a/core/modules/book/tests/src/Functional/BookTestTrait.php b/core/modules/book/tests/src/Functional/BookTestTrait.php index 724feea3605ebb7fba5a8f7bebe7313854f22c51..2bec801f34676aabb98a0e8ee8ad0f47e26603ab 100644 --- a/core/modules/book/tests/src/Functional/BookTestTrait.php +++ b/core/modules/book/tests/src/Functional/BookTestTrait.php @@ -186,8 +186,8 @@ public function createBookNode($book_nid, $parent = NULL, $edit = []) { // Used to ensure that when sorted nodes stay in same order. static $number = 0; - $edit['title[0][value]'] = str_pad($number, 2, '0', STR_PAD_LEFT) . ' - SimpleTest test node ' . $this->randomMachineName(10); - $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); + $edit['title[0][value]'] = str_pad($number, 2, '0', STR_PAD_LEFT) . ' - test node ' . $this->randomMachineName(10); + $edit['body[0][value]'] = 'test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); $edit['book[bid]'] = $book_nid; if ($parent !== NULL) { diff --git a/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php index 6ab14c1581f962035ed8ee92f29a86659c1394f9..1cae2531a6fa6a90976d0e52aaf9c5adc3503ea6 100644 --- a/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php +++ b/core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php @@ -116,8 +116,8 @@ protected function createBookNode($book_nid, $parent = NULL) { static $number = 0; $edit = []; - $edit['title[0][value]'] = $number . ' - SimpleTest test node ' . $this->randomMachineName(10); - $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); + $edit['title[0][value]'] = $number . ' - test node ' . $this->randomMachineName(10); + $edit['body[0][value]'] = 'test body ' . $this->randomMachineName(32) . ' ' . $this->randomMachineName(32); $edit['book[bid]'] = $book_nid; if ($parent !== NULL) { diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index 338615b7b08826248465be4c903ab3ce13c3407c..8eeef3beba408919f1132494934713e3be11e943 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -42,14 +42,14 @@ protected function setupEntityTypes() { $definition = $this->createMock(EntityTypeInterface::class); $definition->expects($this->any()) ->method('getClass') - ->will($this->returnValue(SimpleTestEntity::class)); + ->will($this->returnValue(TestEntity::class)); $definition->expects($this->any()) ->method('isRevisionable') ->willReturn(FALSE); $revisionable_definition = $this->createMock(EntityTypeInterface::class); $revisionable_definition->expects($this->any()) ->method('getClass') - ->will($this->returnValue(SimpleTestEntity::class)); + ->will($this->returnValue(TestEntity::class)); $revisionable_definition->expects($this->any()) ->method('isRevisionable') ->willReturn(TRUE); @@ -245,5 +245,5 @@ public function testSetLatestRevisionFlag($defaults, $parameters, $expected_para /** * A concrete entity. */ -class SimpleTestEntity extends EntityBase { +class TestEntity extends EntityBase { } diff --git a/core/modules/dblog/tests/src/Functional/DbLogTest.php b/core/modules/dblog/tests/src/Functional/DbLogTest.php index 535a550e62e9ed6e03d9d1cf390f9b1cb2261869..6ec963a0df3ace1f24d052865ccfb2714585a0cf 100644 --- a/core/modules/dblog/tests/src/Functional/DbLogTest.php +++ b/core/modules/dblog/tests/src/Functional/DbLogTest.php @@ -824,7 +824,7 @@ protected function getSeverityConstant($class) { * @param string $log_message * The database log message to check. * @param string $message - * The message to pass to simpletest. + * A message to display if the assertion fails. * * @internal */ diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php index 3acbd451c582c5c97f518f65ba90514e12e8e459..d87c3a83793bbea2d7add4e0db46995a578046ef 100644 --- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php +++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyReadOnlyStreamWrapper.php @@ -22,7 +22,7 @@ public function getName() { * {@inheritdoc} */ public function getDescription() { - return t('Dummy wrapper for simpletest (readonly).'); + return t('Dummy wrapper for testing (readonly).'); } public function getDirectoryPath() { diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyRemoteStreamWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyRemoteStreamWrapper.php index 9f18d2a2d4c9ed9133b2d4d2769b6675c7a9f39e..476b320af4dbdd296d839b8ccfd297c64119135a 100644 --- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyRemoteStreamWrapper.php +++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyRemoteStreamWrapper.php @@ -24,7 +24,7 @@ public function getName() { * {@inheritdoc} */ public function getDescription() { - return t('Dummy wrapper for simpletest (remote).'); + return t('Dummy wrapper for testing (remote).'); } public function realpath() { diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php index 20def09697513da8c463f72266e59f0525cedc94..3609941d132353925e206f0f68d68be76afc386e 100644 --- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php +++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php @@ -22,7 +22,7 @@ public function getName() { * {@inheritdoc} */ public function getDescription() { - return t('Dummy wrapper for simpletest.'); + return t('Dummy wrapper for testing.'); } public function getDirectoryPath() { diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php index e4f3190ae81548d01771b79de77a5af6f11ee411..ea1843f8558a08a619c31d43616bbbad1fd7e984 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -139,7 +139,7 @@ public function testMultiValuedWidget() { // Visit the node creation form, and upload 3 files for each field. Since // the field has cardinality of 3, ensure the "Upload" button is displayed // until after the 3rd file, and after that, isn't displayed. Because - // SimpleTest triggers the last button with a given name, so upload to the + // the last button with a given name is triggered by default, upload to the // second field first. $this->drupalGet("node/add/$type_name"); foreach ([$field_name2, $field_name] as $each_field_name) { diff --git a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php index 53f83d9490fe5eea80dfa4e16b2e8c581eaa4a5c..d56b5e2828955e74072d3f0109977eea80484cfc 100644 --- a/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php +++ b/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php @@ -77,7 +77,7 @@ public function testFiles() { $this->assertEntity(1, 'Image1.png', 39325, 'public://image-1.png', 'image/png', 1); $this->assertEntity(2, 'Image2.jpg', 1831, 'public://image-2.jpg', 'image/jpeg', 1); $this->assertEntity(3, 'image-3.jpg', 1831, 'public://image-3.jpg', 'image/jpeg', 1); - $this->assertEntity(4, 'html-1.txt', 24, 'public://html-1.txt', 'text/plain', 1); + $this->assertEntity(4, 'html-1.txt', 19, 'public://html-1.txt', 'text/plain', 1); // Ensure temporary file was not migrated. $this->assertNull(File::load(6)); diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php index c7f9b5fadfb8b340c2d59020a1af510f7602f78a..9b452eee4713d407c6a214a3ac055cb4e5061526 100644 --- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -1131,7 +1131,7 @@ public function testHtmlCorrectorFilter() { * Asserts that a text transformed to lowercase with HTML entities decoded does contains a given string. * * Otherwise fails the test with a given message, similar to all the - * SimpleTest assert* functions. + * PHPUnit assert* functions. * * Note that this does not remove nulls, new lines and other characters that * could be used to obscure a tag or an attribute name. @@ -1142,12 +1142,10 @@ public function testHtmlCorrectorFilter() { * Lowercase, plain text to look for. * @param string $message * (optional) Message to display if failed. Defaults to an empty string. - * @param string $group - * (optional) The group this message belongs to. Defaults to 'Other'. * * @internal */ - public function assertNormalized(string $haystack, string $needle, string $message = '', string $group = 'Other'): void { + public function assertNormalized(string $haystack, string $needle, string $message = ''): void { $this->assertStringContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); } @@ -1155,7 +1153,7 @@ public function assertNormalized(string $haystack, string $needle, string $messa * Asserts that text transformed to lowercase with HTML entities decoded does not contain a given string. * * Otherwise fails the test with a given message, similar to all the - * SimpleTest assert* functions. + * PHPUnit assert* functions. * * Note that this does not remove nulls, new lines, and other character that * could be used to obscure a tag or an attribute name. @@ -1166,12 +1164,10 @@ public function assertNormalized(string $haystack, string $needle, string $messa * Lowercase, plain text to look for. * @param string $message * (optional) Message to display if failed. Defaults to an empty string. - * @param string $group - * (optional) The group this message belongs to. Defaults to 'Other'. * * @internal */ - public function assertNoNormalized(string $haystack, string $needle, string $message = '', string $group = 'Other'): void { + public function assertNoNormalized(string $haystack, string $needle, string $message = ''): void { $this->assertStringNotContainsString($needle, strtolower(Html::decodeEntities($haystack)), $message); } diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php index 3e31c9e50e4b365244f93ac6bb51cceac1d12521..6bd66cf834a860902ea8c92f65a7b6df5260a221 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -45,7 +45,7 @@ public function testValid() { $this->submitForm([], 'Remove'); $this->submitForm([], 'Save'); - // Get invalid image test files from simpletest. + // Get invalid image test files. $dir = 'core/tests/fixtures/files'; $files = []; if (is_dir($dir)) { diff --git a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php index e7a26205cddaebeaee120129501710db6158011d..efd707aa0ac5f00d90d7e91bab00e0179c71264e 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php @@ -94,8 +94,7 @@ private function createMigrationConnection() { $connection_info = Database::getConnectionInfo('default'); foreach ($connection_info as $target => $value) { $prefix = $value['prefix']; - // Simpletest uses 7 character prefixes at most so this can't cause - // collisions. + // Tests use 7 character prefixes at most so this can't cause collisions. $connection_info[$target]['prefix'] = $prefix . '0'; } Database::addConnectionInfo('migrate', 'default', $connection_info['default']); diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php index b17e25b7a901f5c7402dc44e16c29719f4754d7a..a24763c49b62835a3764039948095f1e62a0b251 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationPluginListTest.php @@ -136,8 +136,7 @@ public function testGetDefinitions() { $connection_info = Database::getConnectionInfo('default'); foreach ($connection_info as $target => $value) { $prefix = $value['prefix']; - // Simpletest uses 7 character prefixes at most so this can't cause - // collisions. + // Tests use 7 character prefixes at most so this can't cause collisions. $connection_info[$target]['prefix'] = $prefix . '0'; } Database::addConnectionInfo('migrate', 'default', $connection_info['default']); diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php index b4cc93b8fdd51f7f81073065a6edbd4611a95391..df5f4230edcd839aebd238bfdf55baa29ca3abbc 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php @@ -99,8 +99,8 @@ protected function createMigrationConnection() { $connection_info = Database::getConnectionInfo('default')['default']; if ($connection_info['driver'] === 'sqlite') { // Create database file in the test site's public file directory so that - // \Drupal\simpletest\TestBase::restoreEnvironment() will delete this once - // the test is complete. + // \Drupal\Tests\BrowserTestBase::cleanupEnvironment() will delete this + // once the test is complete. $file = $this->publicFilesDirectory . '/' . $this->testId . '-migrate.db.sqlite'; touch($file); $connection_info['database'] = $file; @@ -108,9 +108,9 @@ protected function createMigrationConnection() { } else { $prefix = $connection_info['prefix']; - // Simpletest uses fixed length prefixes. Create a new prefix for the + // Test databases use fixed length prefixes. Create a new prefix for the // source database. Adding to the end of the prefix ensures that - // \Drupal\simpletest\TestBase::restoreEnvironment() will remove the + // \Drupal\Tests\BrowserTestBase::cleanupEnvironment() will remove the // additional tables. $connection_info['prefix'] = $prefix . '0'; } diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/tests/fixtures/files/html-1.txt b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/tests/fixtures/files/html-1.txt index 494470d17178bde3a388e0c2e74cf008c73f128e..93e18a7177f4127fb1f230f2083b4c563ecd4cdc 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/tests/fixtures/files/html-1.txt +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/core/tests/fixtures/files/html-1.txt @@ -1 +1 @@ -<h1>SimpleTest HTML</h1> \ No newline at end of file +<h1>Test HTML</h1> diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg index 494470d17178bde3a388e0c2e74cf008c73f128e..93e18a7177f4127fb1f230f2083b4c563ecd4cdc 100644 --- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/files/tmp/some-temp-file.jpg @@ -1 +1 @@ -<h1>SimpleTest HTML</h1> \ No newline at end of file +<h1>Test HTML</h1> diff --git a/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php index b8b8e95b718174b20013840411b394e93c28ca4f..1b018eeca361d41f66aa15f5acd976255e5e04fa 100644 --- a/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php @@ -196,7 +196,7 @@ public function testCommentRdfaMarkup() { // Posts comment #2 as anonymous user. $anonymous_user = []; $anonymous_user['name'] = $this->randomMachineName(); - $anonymous_user['mail'] = 'tester@simpletest.org'; + $anonymous_user['mail'] = 'test@example.org'; $anonymous_user['homepage'] = 'http://example.org/'; $comment2 = $this->saveComment($this->node->id(), 0, $anonymous_user); diff --git a/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php index 5c2f67fa9252bb0a14a8a8e96a5a5bb5c4fc7226..3b2f8be3c5f7041a3dae2bd50b3fbf4064a6fdda 100644 --- a/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php @@ -80,7 +80,7 @@ protected function setUp(): void { ->setBundleMapping(['types' => []]) ->save(); - // Get the test image that simpletest provides. + // Get the test image. $image = current($this->drupalGetTestFiles('image')); // Save a node with the image. diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module index 7adeffef9cec7c01b5ed7cc29712e0017d7a55f6..7896856a4b0d7ce29bdea676e69e66ec0f2efe3c 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module +++ b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module @@ -2,7 +2,7 @@ /** * @file - * Simpletest mock module for Ajax forms testing. + * Mock module for Ajax forms testing. */ use Drupal\Core\Ajax\AddCssCommand; diff --git a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php index 8804b1bd3788e2540c8b07391cdf04d92968a675..5532b3d06d68c525e1ce03c287a03f091c63cf8f 100644 --- a/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php +++ b/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestCommandsForm.php @@ -206,8 +206,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]; // Demonstrates the Ajax 'settings' command. The 'settings' command has - // nothing visual to "show", but it can be tested via SimpleTest and via - // Firebug. + // nothing visual to "show", but it can be tested. $form['settings_command_example'] = [ '#type' => 'submit', '#value' => $this->t("AJAX 'settings' command"), diff --git a/core/modules/system/tests/modules/conneg_test/conneg_test.routing.yml b/core/modules/system/tests/modules/conneg_test/conneg_test.routing.yml index bedd52efbb8f553f24a029d2b6c98e1676945907..42b96b6423cf5bbd595f6b0e7224f2f52ed1085f 100644 --- a/core/modules/system/tests/modules/conneg_test/conneg_test.routing.yml +++ b/core/modules/system/tests/modules/conneg_test/conneg_test.routing.yml @@ -1,5 +1,5 @@ # Tests -conneg.simpletest: +conneg.test: path: conneg/simple.json defaults: _controller: '\Drupal\conneg_test\Controller\TestController::simple' diff --git a/core/modules/system/tests/modules/database_test/src/Controller/DatabaseTestController.php b/core/modules/system/tests/modules/database_test/src/Controller/DatabaseTestController.php index ddc5f7577b26529d90450587dfe2a65cdcbe2b42..8965f2e2fae56c47e8f78a6d1b285bb72b45088f 100644 --- a/core/modules/system/tests/modules/database_test/src/Controller/DatabaseTestController.php +++ b/core/modules/system/tests/modules/database_test/src/Controller/DatabaseTestController.php @@ -44,7 +44,7 @@ public static function create(ContainerInterface $container) { * Runs a pager query and returns the results. * * This function does care about the page GET parameter, as set by the - * simpletest HTTP call. + * test HTTP call. * * @return \Symfony\Component\HttpFoundation\JsonResponse */ @@ -70,7 +70,7 @@ public function pagerQueryEven($limit) { * Runs a pager query and returns the results. * * This function does care about the page GET parameter, as set by the - * simpletest HTTP call. + * test HTTP call. * * @return \Symfony\Component\HttpFoundation\JsonResponse */ @@ -96,7 +96,7 @@ public function pagerQueryOdd($limit) { * Runs a tablesort query and returns the results. * * This function does care about the page GET parameter, as set by the - * simpletest HTTP call. + * test HTTP call. * * @return \Symfony\Component\HttpFoundation\JsonResponse */ @@ -128,7 +128,7 @@ public function testTablesort() { * Runs a tablesort query with a second order_by after and returns the results. * * This function does care about the page GET parameter, as set by the - * simpletest HTTP call. + * test HTTP call. * * @return \Symfony\Component\HttpFoundation\JsonResponse */ diff --git a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php index 908535c1c7c800cf3f62ce4b22d5241baca14425..b15bb9b00c664d34e7f0166a162db67ddc5b7cca 100644 --- a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php +++ b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php @@ -41,7 +41,7 @@ public static function create(ContainerInterface $container) { * Generate warnings to test the error handler. */ public function generateWarnings($collect_errors = FALSE) { - // Tell Drupal error reporter to send errors to Simpletest or not. + // Tell Drupal error reporter to collect test errors or not. define('SIMPLETEST_COLLECT_ERRORS', $collect_errors); // This will generate a notice. $notice = new \stdClass(); diff --git a/core/modules/system/tests/modules/phpunit_test/phpunit_test.info.yml b/core/modules/system/tests/modules/phpunit_test/phpunit_test.info.yml index 893a2a2ea3174dca78c56790108b323b89025b4c..322966dfe44c2cfb5874f5078be5324e0dff466c 100644 --- a/core/modules/system/tests/modules/phpunit_test/phpunit_test.info.yml +++ b/core/modules/system/tests/modules/phpunit_test/phpunit_test.info.yml @@ -1,5 +1,5 @@ name: PHPUnit Test type: module -description: 'Provides dummy classes for use by SimpleTest tests.' +description: 'Provides dummy classes for use by tests.' package: Testing version: VERSION diff --git a/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php b/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php index 252ac6a176ecdaaecfde618becfde0291199b18c..5d66be93f5cbbb2f67ef014023ec730d63de352e 100644 --- a/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php +++ b/core/modules/system/tests/modules/router_test_directory/src/TestControllers.php @@ -135,7 +135,7 @@ protected function removeExceptionLogger() { // Remove the exception logger from the event dispatcher. We are going to // throw an exception to check if it is properly escaped when rendered as a // backtrace. The exception logger does a call to error_log() which is not - // handled by the Simpletest error handler and would cause a test failure. + // handled by the test error handler and would cause a test failure. $event_dispatcher = \Drupal::service('event_dispatcher'); $exception_logger = \Drupal::service('exception.logger'); $event_dispatcher->removeSubscriber($exception_logger); diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php index 34019fdddb25a886b62732c068541cce7d98e35c..1f2dd2bd977f755a4e4289375109a43cfa91990b 100644 --- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php +++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php @@ -97,26 +97,6 @@ protected function setUp(): void { ] = $this->createReferenceTestEntities($this->entity); } - /** - * Generates standardized entity cache tags test info. - * - * @param string $entity_type_label - * The label of the entity type whose cache tags to test. - * @param string $group - * The test group. - * - * @return array - * - * @see \Drupal\simpletest\TestBase::getInfo() - */ - protected static function generateStandardizedInfo($entity_type_label, $group) { - return [ - 'name' => "$entity_type_label entity cache tags", - 'description' => "Test the $entity_type_label entity's cache tags.", - 'group' => $group, - ]; - } - /** * Creates the entity to be tested. * diff --git a/core/modules/system/tests/src/Functional/Session/SessionTest.php b/core/modules/system/tests/src/Functional/Session/SessionTest.php index 497f0274307f9340ae23baa4916062e86c663f90..2781e5b86d988be2b66661a36c64a8b4f0c0424c 100644 --- a/core/modules/system/tests/src/Functional/Session/SessionTest.php +++ b/core/modules/system/tests/src/Functional/Session/SessionTest.php @@ -369,7 +369,7 @@ public function sessionReset() { } /** - * Assert whether the SimpleTest browser sent a session cookie. + * Assert whether the test browser sent a session cookie. * * @internal */ diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php index ed7b2340120af6ba5fac59fcb9aee8b32da8440f..f3c99e46188d11f32c422149df00917f11b10d63 100644 --- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php +++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php @@ -56,8 +56,8 @@ public function testTitleTags() { $title = "string with <em>HTML</em>"; // Generate node content. $edit = [ - 'title[0][value]' => '!SimpleTest! ' . $title . $this->randomMachineName(20), - 'body[0][value]' => '!SimpleTest! test body' . $this->randomMachineName(200), + 'title[0][value]' => '!Test! ' . $title . $this->randomMachineName(20), + 'body[0][value]' => '!Test! test body' . $this->randomMachineName(200), ]; // Create the node with HTML in the title. $this->drupalGet('node/add/page'); diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php index 38be5d01bdd3081422d14bbf3691e287c02dfbc9..9f9d08e82f9580662149aa1be5e084495239881b 100644 --- a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php +++ b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php @@ -95,7 +95,7 @@ public function testPrefix() { ]); $this->assertEquals('extra2', $command->getDatabaseConnection($command_tester->getInput())->getPrefix()); - // This breaks simpletest cleanup. + // This breaks test cleanup. // @code // $command_tester->execute([ // '--prefix' => 'notsimpletest', diff --git a/core/modules/toolbar/src/Element/Toolbar.php b/core/modules/toolbar/src/Element/Toolbar.php index 9546533fae63e8866f098b5d8654c23dec5813c9..7fd48691113d5884fe887456e4e16f7a3286c541 100644 --- a/core/modules/toolbar/src/Element/Toolbar.php +++ b/core/modules/toolbar/src/Element/Toolbar.php @@ -30,9 +30,6 @@ public function getInfo() { ], // Metadata for the toolbar wrapping element. '#attributes' => [ - // The id cannot be simply "toolbar" or it will clash with the - // simpletest tests listing which produces a checkbox with attribute - // id="toolbar". 'id' => 'toolbar-administration', 'role' => 'group', 'aria-label' => $this->t('Site administration toolbar'), diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php index d31525e02088a7840acf63e4e0c8e0c66539fc26..814fcb4eff82de45228863f57d19753df607e9e7 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php @@ -56,7 +56,7 @@ public function testUserPictures() { $this->assertEntity(3, 'Image1.png', 39325, 'public://image-1.png', 'image/png', 1); $this->assertEntity(4, 'Image2.jpg', 1831, 'public://image-2.jpg', 'image/jpeg', 1); $this->assertEntity(5, 'Image-test.gif', 183, 'public://image-test.gif', 'image/jpeg', 1); - $this->assertEntity(6, 'html-1.txt', 24, 'public://html-1.txt', 'text/plain', 1); + $this->assertEntity(6, 'html-1.txt', 19, 'public://html-1.txt', 'text/plain', 1); } /** diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index 3fe6bec6b1bd724037807f17dccf104bdd2f39aa..78c8b251d8f402ca50bfb1413d85698558eda6e1 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -2073,11 +2073,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Component/Annotation/Doctrine/DocParserTest.php - - - message: "#^Function container_test_file_service_test_service_function not found\\.$#" - count: 1 - path: tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php - - message: "#^Cannot unset offset int on array\\<string, mixed\\>\\.$#" count: 1 diff --git a/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php b/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php index e20f39e2fdf351cccbb491d573a48b4912dec7c0..d3a9f0d7e8a65594331795856f76741ea726ebc8 100644 --- a/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php +++ b/core/profiles/testing/modules/drupal_system_listing_compatible_test/tests/src/Kernel/SystemListingCrossProfileCompatibleTest.php @@ -28,8 +28,6 @@ class SystemListingCrossProfileCompatibleTest extends KernelTestBase { * This test needs to use a different installation profile than the test which * asserts that this test is found. * - * @see \Drupal\simpletest\Tests\InstallationProfileModuleTestsTest - * * @var string */ protected $profile = 'minimal'; diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 2c9c51d4d3d803dc78dfdbb57ed0b967cbb40596..7daf364cef34342f9c6de65606d80c9192c38a53 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -572,8 +572,8 @@ function simpletest_script_init() { * parameters were passed). * * Otherwise, there are three database connections of concern: - * - --sqlite: The test runner connection, providing access to Simpletest - * database tables for recording test IDs and assertion results. + * - --sqlite: The test runner connection, providing access to database tables + * for recording test IDs and assertion results. * - --dburl: A database connection that is used as base connection info for all * tests; i.e., every test will spawn from this connection. In case this * connection uses e.g. SQLite, then all tests will run against SQLite. This @@ -654,7 +654,7 @@ function simpletest_script_setup_database($new = FALSE) { // Add the test runner database connection. Database::addConnectionInfo('test-runner', 'default', $databases['test-runner']['default']); - // Create the Simpletest schema. + // Create the test result schema. try { $connection = Database::getConnection('default', 'test-runner'); $schema = $connection->schema(); @@ -770,7 +770,7 @@ function simpletest_script_execute_batch($test_classes) { $db_prefix = TestDatabase::lastTestGet($child['test_id'])['last_prefix']; $test_db = new TestDatabase($db_prefix); $test_directory = $test_db->getTestSitePath(); - echo 'Simpletest database and files kept and test exited immediately on fail so should be reproducible if you change settings.php to use the database prefix ' . $db_prefix . ' and config directories in ' . $test_directory . "\n"; + echo 'Test database and files kept and test exited immediately on fail so should be reproducible if you change settings.php to use the database prefix ' . $db_prefix . ' and config directories in ' . $test_directory . "\n"; $args['keep-results'] = TRUE; // Exit repeat loop immediately. $args['repeat'] = -1; @@ -1316,7 +1316,7 @@ function simpletest_script_print_alternatives($string, $array, $degree = 4) { } /** - * Loads the simpletest messages from the database. + * Loads test result messages from the database. * * Messages are ordered by test class and message id. * @@ -1324,7 +1324,7 @@ function simpletest_script_print_alternatives($string, $array, $degree = 4) { * Array of test IDs of the messages to be loaded. * * @return array - * Array of simpletest messages from the database. + * Array of test result messages from the database. */ function simpletest_script_load_messages_by_test_id($test_ids) { global $args; diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php index 894ffdca10b76717710853fc04cac6f4329c13c7..6b39a76f593c671319633464dd0d33274d1d122b 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php @@ -93,7 +93,7 @@ public function testSimpleAJAXFormValue() { $this->assertNotNull($green_span2, 'DOM update: After reload - the selected color SPAN is green.'); $build_id_from_cache_first_ajax = $this->getFormBuildId(); - $this->assertNotEquals($build_id_from_cache_initial, $build_id_from_cache_first_ajax, 'Build id is changed in the simpletest-DOM on first AJAX submission'); + $this->assertNotEquals($build_id_from_cache_initial, $build_id_from_cache_first_ajax, 'Build id is changed in the DOM on first AJAX submission'); $this->assertNotEquals($build_id_first_ajax, $build_id_from_cache_first_ajax, 'Build id from first user is not reused'); // Changing the value of a select input element, triggers an AJAX diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php index de4dd783d17100a5eaa5e244581c7e5dc7a5dd7b..7da9192556ddfa8e9b767bc4f2e6030f13f65b6c 100644 --- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php +++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php @@ -276,7 +276,7 @@ public function testLoggerException() { * @param string $error_message * The expected error message. * - * @see \Drupal\simpletest\TestBase::prepareEnvironment() + * @see \Drupal\Core\Test\FunctionalTestSetupTrait::prepareEnvironment() * @see \Drupal\Core\DrupalKernel::bootConfiguration() * * @internal @@ -306,7 +306,7 @@ protected function assertErrorLogged(string $error_message): void { /** * Asserts that no errors have been logged to the PHP error.log thus far. * - * @see \Drupal\simpletest\TestBase::prepareEnvironment() + * @see \Drupal\Core\Test\FunctionalTestSetupTrait::prepareEnvironment() * @see \Drupal\Core\DrupalKernel::bootConfiguration() * * @internal diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php index 744c29ad5680d607e5dff724ee35e73480263b15..b7aa2a02bd02c38bc150cd08c2b157862559ee3e 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php @@ -31,7 +31,7 @@ public function testUserAgentValidation() { $system_path = $this->buildUrl(\Drupal::service('extension.list.module')->getPath('system')); $http_path = $system_path . '/tests/http.php/user/login'; $https_path = $system_path . '/tests/https.php/user/login'; - // Generate a valid simpletest User-Agent to pass validation. + // Generate a valid test User-Agent to pass validation. $this->assertNotFalse(preg_match('/test\d+/', $this->databasePrefix, $matches), 'Database prefix contains test prefix.'); $this->agent = drupal_generate_test_ua($matches[0]); diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php index a26b06c14b2ac01121295d4a63aa2d3f47eb9062..3bf59c0400bc192d4197a870111354e92dedc7f4 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php @@ -13,8 +13,6 @@ * * @group Test * @group FunctionalTestSetupTrait - * - * @see \Drupal\simpletest\Tests\SimpleTestInstallBatchTest */ class ModuleInstallBatchTest extends BrowserTestBase { diff --git a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php index c74cc08565f8ada5956e1aa79d9bf50e50bbf2af..87cae976fb718dad18a036474d39bd61394a45fe 100644 --- a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php +++ b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php @@ -7,7 +7,7 @@ use Drupal\Core\Test\AssertMailTrait; /** - * Tests the SimpleTest email capturing logic, the assertMail assertion and the + * Tests the email capturing logic, the assertMail assertion and the * drupalGetMails function. * * @group browsertestbase @@ -42,7 +42,7 @@ public function testMailSend() { $this->assertCount(0, $captured_emails, 'The captured emails queue is empty.'); // Send the email. - \Drupal::service('plugin.manager.mail')->getInstance(['module' => 'simpletest', 'key' => 'drupal_mail_test'])->mail($message); + \Drupal::service('plugin.manager.mail')->getInstance(['module' => 'test', 'key' => 'drupal_mail_test'])->mail($message); // Ensure that there is one email in the captured emails array. $captured_emails = $this->drupalGetMails(); diff --git a/core/tests/Drupal/KernelTests/AssertContentTrait.php b/core/tests/Drupal/KernelTests/AssertContentTrait.php index f145e0d1fd285f49fad9d2cecea5e89c08dae835..6db9ddaf35fcd108f62b980e03f4d64bfa05cb3f 100644 --- a/core/tests/Drupal/KernelTests/AssertContentTrait.php +++ b/core/tests/Drupal/KernelTests/AssertContentTrait.php @@ -522,7 +522,7 @@ protected function assertNoEscaped($raw, $message = '', $group = 'Other'): void * translate this string. Defaults to 'Other'; most tests do not override * this default. * - * @see \Drupal\simpletest\AssertContentTrait::assertRaw() + * @see \Drupal\KernelTests\AssertContentTrait::assertRaw() */ protected function assertText($text, $message = '', $group = 'Other'): void { $this->assertTextHelper($text, $message, $group, FALSE); @@ -547,7 +547,7 @@ protected function assertText($text, $message = '', $group = 'Other'): void { * translate this string. Defaults to 'Other'; most tests do not override * this default. * - * @see \Drupal\simpletest\AssertContentTrait::assertNoRaw() + * @see \Drupal\KernelTests\AssertContentTrait::assertNoRaw() */ protected function assertNoText($text, $message = '', $group = 'Other'): void { $this->assertTextHelper($text, $message, $group, TRUE); diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php index 16fc5277d79a2273eca429a28e2fa7b2a8885f9b..9bbfd93f648cb9535f89476f12748e7b88f693d0 100644 --- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @@ -36,14 +36,11 @@ class DefaultConfigTest extends KernelTestBase { * * Comparing them does not make sense. * - * @todo Figure out why simpletest.settings is not installed. - * * @var array */ public static $skippedConfig = [ 'locale.settings' => ['path: '], 'syslog.settings' => ['facility: '], - 'simpletest.settings' => TRUE, ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php index 1fceba33f1ac29f3749df232ff37c7ff15125f0a..b605b2111d45c1771a262e19208eeb19cff2ce76 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php @@ -21,8 +21,8 @@ public function testTableSortInit() { // Test simple table headers. $headers = ['foo', 'bar', 'baz']; - // Reset $request->query to prevent parameters from Simpletest and Batch API - // ending up in $ts['query']. + // Reset $request->query to prevent parameters from Batch API ending up in + // $ts['query']. $expected_ts = [ 'name' => 'foo', 'sql' => '', diff --git a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php index 0f7fa409e92e0de2f587f629d51ae144f69e334a..6b4b8b0f2c0d031af0f19b098d9807ec9605a1e1 100644 --- a/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php +++ b/core/tests/Drupal/KernelTests/Core/Routing/ContentNegotiationRoutingTest.php @@ -104,11 +104,8 @@ public function testContentRouting() { /** @var \Symfony\Component\HttpKernel\HttpKernelInterface $kernel */ $kernel = \Drupal::getContainer()->get('http_kernel'); $response = $kernel->handle($request); - // Verbose message since simpletest doesn't let us provide a message and - // see the error. - $this->assertTrue(TRUE, $message); - $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); - $this->assertStringContainsString($content_type, $response->headers->get('Content-type')); + $this->assertEquals(Response::HTTP_OK, $response->getStatusCode(), $message); + $this->assertStringContainsString($content_type, $response->headers->get('Content-type'), $message); } } diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php index 237d2ac70f738d7dd07ed04d1e0c45a99fbed529..2e6c34e4209e874da880d24adcab76f7c131b87b 100644 --- a/core/tests/Drupal/KernelTests/KernelTestBase.php +++ b/core/tests/Drupal/KernelTests/KernelTestBase.php @@ -585,7 +585,7 @@ public function register(ContainerBuilder $container) { } $definition = $container->getDefinition($id); $definition->clearTag('needs_destruction'); - $container->setDefinition("simpletest.$route_provider_service_name", $definition); + $container->setDefinition("test.$route_provider_service_name", $definition); $route_provider_definition = new Definition(RouteProvider::class); $route_provider_definition->setPublic(TRUE); diff --git a/core/tests/Drupal/KernelTests/RouteProvider.php b/core/tests/Drupal/KernelTests/RouteProvider.php index f075dbae0d78710c30fd5d2de01b6ec46945c00d..27065fd1eb989d28881cb86858ae98954b80116b 100644 --- a/core/tests/Drupal/KernelTests/RouteProvider.php +++ b/core/tests/Drupal/KernelTests/RouteProvider.php @@ -21,7 +21,7 @@ class RouteProvider implements PreloadableRouteProviderInterface { protected function lazyLoadItself() { if (!isset($this->service)) { $container = \Drupal::getContainer(); - $this->service = $container->get('simpletest.router.route_provider'); + $this->service = $container->get('test.router.route_provider'); $container->get('router.builder')->rebuild(); } diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 67ea98619df0829cf3130c5e05f79e5a177b4fc3..229f38055b5a4a224a7e3b1e34dcd3bb66616686 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -417,7 +417,7 @@ public static function filePreDeleteCallback($path) { } /** - * Clean up the Simpletest environment. + * Clean up the test environment. */ protected function cleanupEnvironment() { // Remove all prefixed tables. @@ -544,7 +544,7 @@ protected function getOptions($select, Element $container = NULL) { } /** - * Installs Drupal into the Simpletest site. + * Installs Drupal into the test site. */ public function installDrupal() { $this->initUserSession(); diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index eeb933e0d0a693c570dca826838f49157c075ab3..f6b5cbb3f2d3bd6ab2c0e201b35c6428d47cbb6f 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -868,12 +868,9 @@ protected function getMockContainerDefinition() { $services['synthetic'] = [ 'synthetic' => TRUE, ]; - // The file could have been named as a .php file. The reason it is a .data - // file is that SimpleTest tries to load it. SimpleTest does not like such - // fixtures and hence we use a neutral name like .data. $services['container_test_file_service_test'] = [ 'class' => '\stdClass', - 'file' => __DIR__ . '/Fixture/container_test_file_service_test_service_function.data', + 'file' => __DIR__ . '/Fixture/container_test_file_service_test_service_function.php', ]; // Test multiple arguments. diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.data b/core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.php similarity index 100% rename from core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.data rename to core/tests/Drupal/Tests/Component/DependencyInjection/Fixture/container_test_file_service_test_service_function.php diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php index 166ad9b57fddbfecfc5efcb261532347358b85fc..86e8109737b0adea2d2b71fd1ac480485e37a623 100644 --- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php +++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php @@ -76,7 +76,7 @@ public function testCRUD() { */ public function testSecurity() { $php = new $this->storageClass($this->settings); - $name = 'simpletest.php'; + $name = 'test.php'; $php->save($name, '<?php'); $expected_root_directory = $this->directory . '/test'; if (substr($name, -4) === '.php') { diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php index db5ee1d7b9164ddae0860ded56ac253c2c4b84d4..92974486aea42f6852d1996a313ab219a6bec664 100644 --- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -583,7 +583,7 @@ public function providerTestFilterXssAdminNotNormalized() { * Asserts that a text transformed to lowercase with HTML entities decoded does contain a given string. * * Otherwise fails the test with a given message, similar to all the - * SimpleTest assert* functions. + * PHPUnit assert* functions. * * Note that this does not remove nulls, new lines and other characters that * could be used to obscure a tag or an attribute name. @@ -605,7 +605,7 @@ protected function assertNormalized(string $haystack, string $needle, string $me * Asserts that text transformed to lowercase with HTML entities decoded does not contain a given string. * * Otherwise fails the test with a given message, similar to all the - * SimpleTest assert* functions. + * PHPUnit assert* functions. * * Note that this does not remove nulls, new lines, and other character that * could be used to obscure a tag or an attribute name. diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php index 829d2dfa9a0011b67c275e2eead9f87c0a532760..ad3452f63886fcb93ce5dd4ecb546b9e930492c8 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php @@ -444,14 +444,14 @@ protected function setupEntityTypes() { $definition = $this->createMock('Drupal\Core\Entity\EntityTypeInterface'); $definition->expects($this->any()) ->method('getClass') - ->will($this->returnValue('Drupal\Tests\Core\Entity\SimpleTestEntity')); + ->will($this->returnValue('Drupal\Tests\Core\Entity\TestEntity')); $definition->expects($this->any()) ->method('isRevisionable') ->willReturn(FALSE); $revisionable_definition = $this->createMock('Drupal\Core\Entity\EntityTypeInterface'); $revisionable_definition->expects($this->any()) ->method('getClass') - ->will($this->returnValue('Drupal\Tests\Core\Entity\SimpleTestEntity')); + ->will($this->returnValue('Drupal\Tests\Core\Entity\TestEntity')); $revisionable_definition->expects($this->any()) ->method('isRevisionable') ->willReturn(TRUE); @@ -500,7 +500,7 @@ public function exampleControllerWithEntityUpcasting(EntityInterface $entity_tes /** * A concrete entity. */ -class SimpleTestEntity extends EntityBase { +class TestEntity extends EntityBase { } diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php index 5c3905c6b31f23db596e6002d2a8c87e3c4a71a5..52bb6bb9e9f7f2ad523fd3901f9535e6c07ba522 100644 --- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php +++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php @@ -24,7 +24,7 @@ class MenuLinkMock extends MenuLinkBase { 'options' => [], 'expanded' => '0', 'enabled' => '1', - 'provider' => 'simpletest', + 'provider' => 'test', 'metadata' => [ 'cache_contexts' => [], 'cache_tags' => [], diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php index a49ed7b26bce92b86afb40a6db233730a0ddb10b..31d32bdbaadcfcc179e2674c0910490fce0527c4 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php @@ -46,7 +46,7 @@ public function testBubblingWithoutPreRender() { $element = [ '#type' => 'container', '#cache' => [ - 'keys' => ['simpletest', 'renderer', 'children_attached'], + 'keys' => ['test', 'renderer', 'children_attached'], ], '#attached' => ['library' => ['test/parent']], '#title' => 'Parent', @@ -68,7 +68,7 @@ public function testBubblingWithoutPreRender() { // Load the element from cache and verify the presence of the #attached // JavaScript. - $element = ['#cache' => ['keys' => ['simpletest', 'renderer', 'children_attached']]]; + $element = ['#cache' => ['keys' => ['test', 'renderer', 'children_attached']]]; // Verify that the element was retrieved from the cache. $this->assertNotEmpty($this->renderer->renderRoot($element)); $this->assertEquals($element['#attached']['library'], $expected_libraries, 'The element, child and subchild #attached libraries are included.'); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php index f9006bb3db5e481360223086cf922f6dc973e855..744f7879637017bf9e0b7600b0b5307c3f04fb48 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -1024,7 +1024,7 @@ public function testRenderChildrenPlaceholdersDifferentArguments() { $this->assertSame($element['#attached']['drupalSettings'], $expected_js_settings, '#attached is modified; both the original JavaScript setting and the ones added by each placeholder #lazy_builder callback exist.'); // GET request: validate cached data. - $cached_element = $this->memoryCache->get('simpletest:renderer:children_placeholders')->data; + $cached_element = $this->memoryCache->get('test:renderer:children_placeholders')->data; $expected_element = [ '#attached' => [ 'drupalSettings' => [ @@ -1095,7 +1095,7 @@ protected function generatePlaceholdersWithChildrenTestElement(array $args_1, ar $test_element = [ '#type' => 'details', '#cache' => [ - 'keys' => ['simpletest', 'renderer', 'children_placeholders'], + 'keys' => ['test', 'renderer', 'children_placeholders'], ], '#title' => 'Parent', '#attached' => [ diff --git a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php index 40f29c10e5e581b0446737dfccd68ce28eafb7cf..ca05d32c7730be014bb944ad1cdc5d734ea2d270 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php @@ -88,14 +88,14 @@ public function infoParserProvider() { $tests[] = [ // Expected result. [ - 'name' => 'Drupal\Tests\ExampleSimpleTest', + 'name' => 'Drupal\Tests\ExampleTest', 'group' => 'test', 'groups' => ['test'], 'description' => 'Example test.', 'type' => 'PHPUnit-Unit', ], // Classname. - 'Drupal\Tests\ExampleSimpleTest', + 'Drupal\Tests\ExampleTest', // Doc block. "/** * Example test. @@ -110,14 +110,14 @@ public function infoParserProvider() { $tests[] = [ // Expected result. [ - 'name' => 'Drupal\Tests\ExampleSimpleTest', + 'name' => 'Drupal\Tests\ExampleTest', 'group' => 'test', 'groups' => ['test'], 'description' => 'Example test. * @', 'type' => 'PHPUnit-Unit', ], // Classname. - 'Drupal\Tests\ExampleSimpleTest', + 'Drupal\Tests\ExampleTest', // Doc block. "/** * Example test. * @ @@ -131,14 +131,14 @@ public function infoParserProvider() { $tests[] = [ // Expected result. [ - 'name' => 'Drupal\Tests\ExampleSimpleTest', + 'name' => 'Drupal\Tests\ExampleTest', 'group' => 'test1', 'groups' => ['test1', 'test2'], 'description' => 'Example test.', 'type' => 'PHPUnit-Unit', ], // Classname. - 'Drupal\Tests\ExampleSimpleTest', + 'Drupal\Tests\ExampleTest', // Doc block. "/** * Example test. @@ -153,14 +153,14 @@ public function infoParserProvider() { $tests['many-group-annotations'] = [ // Expected result. [ - 'name' => 'Drupal\Tests\ExampleSimpleTest', + 'name' => 'Drupal\Tests\ExampleTest', 'group' => 'test1', 'groups' => ['test1', 'test2', 'another', 'more', 'many', 'enough', 'whoa'], 'description' => 'Example test.', 'type' => 'PHPUnit-Unit', ], // Classname. - 'Drupal\Tests\ExampleSimpleTest', + 'Drupal\Tests\ExampleTest', // Doc block. "/** * Example test. @@ -180,14 +180,14 @@ public function infoParserProvider() { $tests[] = [ // Expected result. [ - 'name' => 'Drupal\Tests\ExampleSimpleTest', + 'name' => 'Drupal\Tests\ExampleTest', 'description' => 'Example test. And the summary line continues and there is no gap to the annotation.', 'type' => 'PHPUnit-Unit', 'group' => 'test', 'groups' => ['test'], ], // Classname. - 'Drupal\Tests\ExampleSimpleTest', + 'Drupal\Tests\ExampleTest', // Doc block. "/** * Example test. And the summary line continues and there is no gap to the @@ -475,7 +475,7 @@ public function testGetTestInfoEmptyDocblock() { // analysis and already have an empty docblock. getTestInfo() will throw // MissingGroupException because the annotation is empty. $this->expectException(MissingGroupException::class); - TestDiscovery::getTestInfo('Drupal\Tests\simpletest\ThisTestDoesNotExistTest', ''); + TestDiscovery::getTestInfo('Drupal\Tests\ThisTestDoesNotExistTest', ''); } /** diff --git a/core/tests/Drupal/Tests/RandomGeneratorTrait.php b/core/tests/Drupal/Tests/RandomGeneratorTrait.php index 0f27c63df741285b75f755fc5a52d01e40f8369f..ff0d97845b8b3cd803b632b979d8dc7feaecb76b 100644 --- a/core/tests/Drupal/Tests/RandomGeneratorTrait.php +++ b/core/tests/Drupal/Tests/RandomGeneratorTrait.php @@ -21,10 +21,10 @@ trait RandomGeneratorTrait { * * Do not use this method when special characters are not possible (e.g., in * machine or file names that have already been validated); instead, use - * \Drupal\simpletest\TestBase::randomMachineName(). If $length is greater - * than 3 the random string will include at least one ampersand ('&') and - * at least one greater than ('>') character to ensure coverage for special - * characters and avoid the introduction of random test failures. + * \Drupal\Tests\RandomGeneratorTrait::randomMachineName(). If $length is + * greater than 3 the random string will include at least one ampersand ('&') + * and at least one greater than ('>') character to ensure coverage for + * special characters and avoid the introduction of random test failures. * * @param int $length * Length of random string to generate. @@ -79,7 +79,7 @@ public function randomStringValidate($string) { * Generates a unique random string containing letters and numbers. * * Do not use this method when testing unvalidated user input. Instead, use - * \Drupal\simpletest\TestBase::randomString(). + * \Drupal\Tests\RandomGeneratorTrait::randomString(). * * @param int $length * Length of random string to generate. diff --git a/core/tests/fixtures/files/html-1.txt b/core/tests/fixtures/files/html-1.txt index 494470d17178bde3a388e0c2e74cf008c73f128e..93e18a7177f4127fb1f230f2083b4c563ecd4cdc 100644 --- a/core/tests/fixtures/files/html-1.txt +++ b/core/tests/fixtures/files/html-1.txt @@ -1 +1 @@ -<h1>SimpleTest HTML</h1> \ No newline at end of file +<h1>Test HTML</h1> diff --git a/core/tests/fixtures/files/html-2.html b/core/tests/fixtures/files/html-2.html index 494470d17178bde3a388e0c2e74cf008c73f128e..93e18a7177f4127fb1f230f2083b4c563ecd4cdc 100644 --- a/core/tests/fixtures/files/html-2.html +++ b/core/tests/fixtures/files/html-2.html @@ -1 +1 @@ -<h1>SimpleTest HTML</h1> \ No newline at end of file +<h1>Test HTML</h1> diff --git a/core/tests/fixtures/files/javascript-1.txt b/core/tests/fixtures/files/javascript-1.txt index efd44fd9360ad1865cc4a31ca2a2f64b4977be29..f095f34c6775991ac209aa5fc319f12a05fabed5 100644 --- a/core/tests/fixtures/files/javascript-1.txt +++ b/core/tests/fixtures/files/javascript-1.txt @@ -1,3 +1,3 @@ <script> -alert('SimpleTest PHP was executed!'); +alert('JavaScript was executed!'); </script> diff --git a/core/tests/fixtures/files/javascript-2.script b/core/tests/fixtures/files/javascript-2.script index e0206ba8319b0db6cc237a16010a78b5a279280a..f095f34c6775991ac209aa5fc319f12a05fabed5 100644 --- a/core/tests/fixtures/files/javascript-2.script +++ b/core/tests/fixtures/files/javascript-2.script @@ -1,3 +1,3 @@ <script> -alert('SimpleTest PHP was executed!'); -</script> \ No newline at end of file +alert('JavaScript was executed!'); +</script> diff --git a/core/tests/fixtures/files/php-1.txt b/core/tests/fixtures/files/php-1.txt index 4e0ef6e790d985556934b6a16c2b8b9e4103733e..b7dcb41c2892d7dabacb91aee5bb7ef43ec11995 100644 --- a/core/tests/fixtures/files/php-1.txt +++ b/core/tests/fixtures/files/php-1.txt @@ -1,4 +1,4 @@ <?php // phpcs:ignoreFile -print 'SimpleTest PHP was executed!'; +print 'PHP was executed!'; ?> diff --git a/core/tests/fixtures/files/php-2.php b/core/tests/fixtures/files/php-2.php index dffc523912c0eb9a8a1159c63ca94d83756be001..9aba18414119dcdc7b8cf827223434993de42bb6 100644 --- a/core/tests/fixtures/files/php-2.php +++ b/core/tests/fixtures/files/php-2.php @@ -1,3 +1,3 @@ <?php // phpcs:ignoreFile -print 'SimpleTest PHP was executed!'; +print 'PHP was executed!'; diff --git a/example.gitignore b/example.gitignore index 7cc32279748468fbb29ced225faccf662539a63d..d77a48bc88649d6621b8b2221dfda3b7bec77d92 100644 --- a/example.gitignore +++ b/example.gitignore @@ -25,7 +25,7 @@ sites/*/services*.yml sites/*/files sites/*/private -# Ignore SimpleTest multi-site environment. +# Ignore multi-site test environment. sites/simpletest # If you prefer to store your .gitignore file in the sites/ folder, comment @@ -38,5 +38,5 @@ sites/simpletest # */files # */private -# Ignore SimpleTest multi-site environment. +# Ignore multi-site test environment. # simpletest