diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 1fe36c797631d140a58fee2f146d176d52146939..bca0360374388a89003f5c8785783c0904542ffd 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -125,7 +125,6 @@ datelist daterange datestamp datetimeiso -datetimeplus dburl dealerdirect defaultable @@ -167,7 +166,6 @@ drupalmediatoolbar editables egulias elbonia -elems encapsed endautoescape endcode @@ -357,7 +355,6 @@ nplurals ntfs nyholm oembed -omittable onecol oneplusfourgrid optgroups @@ -385,7 +382,6 @@ phpserialize phpspec pickable pingback -pjpeg placeholdered placeholdering plusthick @@ -408,8 +404,6 @@ presave pretransaction preuninstall prophesize -prophesized -prophesizing protossl pseudotag puzzlepiece @@ -432,7 +426,6 @@ referer refinable reindexing renderables -reparenting replyto resave resaved @@ -445,7 +438,6 @@ revisionable revisioned revisionid revisioning -ribisi rowspans rtsp ruleset @@ -534,17 +526,13 @@ tableinfo tableresponsive tableselect tablesort -tablesort's tablesorts tabset tabwidth -taskless tbachert testbot -testbots testlogger textareas -textboxes textfields themename themer @@ -558,7 +546,6 @@ timemap timespan tinyint tinytext -titlealert titlebar tlds tmpfs @@ -589,7 +576,6 @@ unminified unmoderated unpromote unpublishing -unrevisionable unrouted unsanitized unserialization @@ -607,7 +593,6 @@ upscaling urandom userinfo versionable -versionless vfsstream viewports wcag @@ -621,7 +606,6 @@ webservers widthx wordsafe writeln -xbap xbitmap xmlhttp xpsdocument diff --git a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php index 40795627017731b8ec54595e39f67b64cede3867..127559229f055f1d1baab888098ab199f15d6c35 100644 --- a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php +++ b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php @@ -8,7 +8,7 @@ use Drupal\Tests\content_translation\Traits\ContentTranslationTestTrait; use Drupal\Tests\TestFileCreationTrait; -// cspell:ignore Scarlett Johansson +// cspell:ignore Scarlett Johansson ribisi /** * Uploads images to translated nodes. diff --git a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php index 0c296462639e454105e6751d9596632fb4193e9d..34e0a0eee043490ba6a683829beb5d973d85ddaa 100644 --- a/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php +++ b/core/modules/menu_link_content/tests/src/Kernel/MenuLinksTest.php @@ -209,9 +209,9 @@ public function testMenuLinkOnEntityDelete(): void { } /** - * Tests automatic reparenting of menu links. + * Tests automatic update of parent menu links. */ - public function testMenuLinkReparenting($module = 'menu_test'): void { + public function testMenuLinkParentUpdate($module = 'menu_test'): void { // Check the initial hierarchy. $links = $this->createLinkHierarchy($module); @@ -277,7 +277,7 @@ public function testMenuLinkReparenting($module = 'menu_test'): void { /** * Tests the MenuLinkContent::preDelete function. */ - public function testMenuLinkContentReparenting(): void { + public function testMenuLinkContentParentUpdate(): void { // Add new menu items in a hierarchy. $parent = MenuLinkContent::create([ 'title' => $this->randomMachineName(8), diff --git a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php index a9049f59ec9bf624fa13eda7893f6790ff550905..aa917f234808db9c8e8a4d6acba7d682e4518af8 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php @@ -32,21 +32,21 @@ class MigrateProcessErrorMessagesTest extends MigrateTestBase { ]; /** - * A prophesized Process Plugin Manager. + * A mock Process Plugin Manager. * * @var \Prophecy\Prophecy\ObjectProphecy */ protected ObjectProphecy $processPluginManager; /** - * A prophesized ID Map Plugin Manager. + * A mock ID Map Plugin Manager. * * @var \Prophecy\Prophecy\ObjectProphecy */ protected ObjectProphecy $idMapPluginManager; /** - * A prophesized ID Map. + * A mock ID Map. * * @var \Prophecy\Prophecy\ObjectProphecy */ diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php index 88d681747896d89f63eb13c2704098c1017fc68d..014b7e8f4b5b6587a72c1e31506adb15eb4af31a 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php @@ -26,7 +26,7 @@ class SqlTest extends MigrateTestBase { protected $database; /** - * Prophesized event dispatcher. + * A mock event dispatcher. * * @var object|\Prophecy\Prophecy\ProphecySubjectInterface|\Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php index 7216dd895fd9d46b141715af05ea51496fce0cf9..ddb4871f2d2811dccaa7ea963b2e97542f718f83 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityRevisionTest.php @@ -38,9 +38,9 @@ protected function setUp(): void { } /** - * Tests that revision destination fails for unrevisionable entities. + * Tests entities that do not support revisions. */ - public function testUnrevisionable(): void { + public function testNoRevisionSupport(): void { $this->entityType->getKey('id')->willReturn('id'); $this->entityType->getKey('revision')->willReturn(''); $this->entityFieldManager->getBaseFieldDefinitions('foo') diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index bb717da2a69fe1165038810e3ced729618f7172f..fd9dccbdb385fcee53cfeb6ec631b251a446f6a1 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -475,7 +475,8 @@ public function testGet(): void { $this->provisionEntityResource(TRUE); $expected_403_cacheability = $this->getExpectedUnauthorizedAccessCacheability() ->addCacheableDependency($this->getExpectedUnauthorizedEntityAccessCacheability(static::$auth !== FALSE)); - // DX: 403 because unauthorized single-format route, ?_format is omittable. + // DX: 403 because unauthorized single-format route, ?_format can be + // omitted. $url->setOption('query', []); $response = $this->request('GET', $url, $request_options); if ($has_canonical_url) { @@ -496,7 +497,7 @@ public function testGet(): void { // Then, what we'll use for the remainder of the test: multiple formats. $this->provisionEntityResource(); - // DX: 406 because despite unauthorized, ?_format is not omittable. + // DX: 406 because despite unauthorized, ?_format can not be omitted. $url->setOption('query', []); $response = $this->request('GET', $url, $request_options); if ($has_canonical_url) { diff --git a/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php index d7ad7c9af75b337528c12076cbc590fa8799b036..af05153af2fd40ab362dfc3a99ac03e45f388eb4 100644 --- a/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php +++ b/core/modules/system/tests/modules/delay_cache_tags_invalidation/src/Hook/DelayCacheTagsInvalidationHooks.php @@ -25,8 +25,8 @@ public function entityTestInsert(EntityTest $entity) { } // Read the pre-transaction cache writes. // @see \Drupal\KernelTests\Core\Cache\EndOfTransactionQueriesTest::testEntitySave() - \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pretransaction_foobar', \Drupal::cache()->get('test_cache_pretransaction_foobar')); - \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pretransaction_entity_test_list', \Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); + \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pre-transaction_foobar', \Drupal::cache()->get('test_cache_pre-transaction_foobar')); + \Drupal::state()->set('delay_cache_tags_invalidation_entity_test_insert' . '__pre-transaction_entity_test_list', \Drupal::cache()->get('test_cache_pre-transaction_entity_test_list')); // Write during the transaction. \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_foobar', 'something', Cache::PERMANENT, ['foobar']); \Drupal::cache()->set('delay_cache_tags_invalidation_entity_test_insert' . '__during_transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); diff --git a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.info.yml b/core/modules/system/tests/modules/jquery_key_event_polyfill_test/jquery_key_event_polyfill_test.info.yml similarity index 100% rename from core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.info.yml rename to core/modules/system/tests/modules/jquery_key_event_polyfill_test/jquery_key_event_polyfill_test.info.yml diff --git a/core/modules/system/tests/modules/jquery_key_event_polyfill_test/jquery_key_event_polyfill_test.libraries.yml b/core/modules/system/tests/modules/jquery_key_event_polyfill_test/jquery_key_event_polyfill_test.libraries.yml new file mode 100644 index 0000000000000000000000000000000000000000..67031067b79befecb75c6e2e7236f0daed466779 --- /dev/null +++ b/core/modules/system/tests/modules/jquery_key_event_polyfill_test/jquery_key_event_polyfill_test.libraries.yml @@ -0,0 +1,4 @@ +jquery.key_event.polyfill: + version: VERSION + js: + js/jquery.key_event.polyfill.js: { } diff --git a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/js/jquery.keyevent.polyfill.js b/core/modules/system/tests/modules/jquery_key_event_polyfill_test/js/jquery.key_event.polyfill.js similarity index 100% rename from core/modules/system/tests/modules/jquery_keyevent_polyfill_test/js/jquery.keyevent.polyfill.js rename to core/modules/system/tests/modules/jquery_key_event_polyfill_test/js/jquery.key_event.polyfill.js diff --git a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.libraries.yml b/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.libraries.yml deleted file mode 100644 index f8454ee24a3e46c9f1e890b70306a53b6f61d20f..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/modules/jquery_keyevent_polyfill_test/jquery_keyevent_polyfill_test.libraries.yml +++ /dev/null @@ -1,4 +0,0 @@ -jquery.keyevent.polyfill: - version: VERSION - js: - js/jquery.keyevent.polyfill.js: { } diff --git a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php index ca47d2931ce87439196acaec88f93e7ea1514eab..60b7c12b5a13b186b578cd27ef402a38f599825c 100644 --- a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php +++ b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php @@ -47,7 +47,7 @@ public function testTableSortQuery(): void { /** * Confirms precedence of tablesorts headers. * - * If a tablesort's orderByHeader is called before another orderBy, then its + * If a tablesort orderByHeader is called before another orderBy, then its * header happens first. */ public function testTableSortQueryFirst(): void { diff --git a/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php b/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php index 274c6044c3802d904e83cba75f3913e7b8cb65c7..2356b00caf6ec900d2bbada113951007c1498c0d 100644 --- a/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php +++ b/core/modules/system/tests/src/Functional/DrupalKernel/ContentNegotiationTest.php @@ -6,7 +6,7 @@ use Drupal\Tests\BrowserTestBase; -// cspell:ignore msword silverlight +// cspell:ignore msword pjpeg silverlight xbap /** * Tests content negotiation. diff --git a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php index 0cf78d2aeea3b232da0dd1eb798e46d473786dd2..d43db74a4eac74f4235891b4f6daeb7a8415c919 100644 --- a/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php +++ b/core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php @@ -61,8 +61,8 @@ protected function testFormLabels(): void { // appropriate override and correct behavior. $this->assertSession()->elementExists('xpath', '//input[@id="edit-form-checkbox-test"]/following-sibling::label[@for="edit-form-checkbox-test" and @class="option"]'); - // Exercise various defaults for textboxes and modifications to ensure - // appropriate override and correct behavior. + // Exercise various textbox defaults and modifications to ensure appropriate + // override and correct behavior. // Verify that label precedes textfield, with required marker inside label. $this->assertSession()->elementExists('xpath', '//label[@for="edit-form-textfield-test-title-and-required" and @class="js-form-required form-required"]/following-sibling::input[@id="edit-form-textfield-test-title-and-required"]'); diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index c802b737f7e03fc66ca6f54e7aa79c30d65bd20d..fa9995eea82ee2e04fe4756b14cbeaaf8df4372a 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -264,12 +264,12 @@ public function testExposedBlock($display): void { $this->assertSession()->pageTextMatchesCount(2, '/' . $view->getTitle() . '/'); // Set a custom label on the exposed filter form block. - $block->getPlugin()->setConfigurationValue('views_label', '<strong>Custom</strong> title<script>alert("hacked!");</script>'); + $block->getPlugin()->setConfigurationValue('views_label', '<strong>Custom</strong> title <script>alert("hacked!");</script>'); $block->save(); // Test that the content block label is found. $this->drupalGet('test_exposed_block'); - $this->assertSession()->responseContains('<strong>Custom</strong> titlealert("hacked!");'); + $this->assertSession()->responseContains('<strong>Custom</strong> title alert("hacked!");'); // Set label to hidden on the exposed filter form block. $block->getPlugin()->setConfigurationValue('label_display', FALSE); @@ -279,7 +279,7 @@ public function testExposedBlock($display): void { // Assert that the only occurrence of `$view->getTitle()` is the title tag // now that label has been removed. $this->drupalGet('test_exposed_block'); - $this->assertSession()->responseNotContains('<strong>Custom</strong> titlealert("hacked!");'); + $this->assertSession()->responseNotContains('<strong>Custom</strong> title alert("hacked!");'); $this->assertSession()->elementContains('css', 'title', $view->getTitle()); $this->assertSession()->pageTextMatchesCount(1, '/' . $view->getTitle() . '/'); diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 4d93808ae596059cba8bf1407f0671d36788f881..9e6fd1f4cf0ce5c61e076859cfeebb8519aa2278 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -36,7 +36,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Process\Process; -// cspell:ignore exitcode wwwrun +// cspell:ignore exitcode testbots wwwrun // Define some colors for display. // A nice calming green. diff --git a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php index 53c66638ed45dd995b6e95fa9798389da23ea776..ea7d7bb8dde2d8e4233e008d02d018cdcbd60b16 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php @@ -80,7 +80,7 @@ protected function installModulesFromClassProperty(ContainerInterface $container self::$modules = [ 'js_testing_ajax_request_test', 'js_testing_log_test', - 'jquery_keyevent_polyfill_test', + 'jquery_key_event_polyfill_test', ]; if ($this->disableCssAnimations) { self::$modules[] = 'css_disable_transitions_test'; diff --git a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php index dab338899e392dfa65dc63a71bd2e26178aa098e..dc925e2d777ded8952749654a9532a7a218f6203 100644 --- a/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php @@ -15,8 +15,6 @@ use Symfony\Component\DependencyInjection\Reference; use Drupal\Component\Serialization\PhpSerialize; -// cspell:ignore pretransaction - /** * Tests delaying of cache tag invalidation queries to the end of transactions. * @@ -67,8 +65,8 @@ public function register(ContainerBuilder $container): void { * Tests an entity save. */ public function testEntitySave(): void { - \Drupal::cache()->set('test_cache_pretransaction_foobar', 'something', Cache::PERMANENT, ['foobar']); - \Drupal::cache()->set('test_cache_pretransaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); + \Drupal::cache()->set('test_cache_pre-transaction_foobar', 'something', Cache::PERMANENT, ['foobar']); + \Drupal::cache()->set('test_cache_pre-transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); $entity = EntityTest::create(['name' => $this->randomString()]); @@ -107,20 +105,20 @@ public function testEntitySave(): void { // DO NOT depend on invalidated cache tags DO get written. Of course, if we // read either one now, outside of the context of the transaction, we expect // the same. - $this->assertNotEmpty(\Drupal::state()->get('delay_cache_tags_invalidation_entity_test_insert__pretransaction_foobar')); + $this->assertNotEmpty(\Drupal::state()->get('delay_cache_tags_invalidation_entity_test_insert__pre-transaction_foobar')); $this->assertNotEmpty(\Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_foobar')); $this->assertNotEmpty(\Drupal::state()->get('delay_cache_tags_invalidation_user_insert__during_transaction_foobar')); - $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pretransaction_foobar')); + $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pre-transaction_foobar')); // Cache reads occurring during a transaction that DO depend on invalidated // cache tags result in cache MISSes. Similarly, cache writes that DO depend // on invalidated cache tags DO NOT get written. Of course, if we read // either one now, outside of the context of the transaction, we expect the // same. - $this->assertFalse(\Drupal::state()->get('delay_cache_tags_invalidation_entity_test_insert__pretransaction_entity_test_list')); + $this->assertFalse(\Drupal::state()->get('delay_cache_tags_invalidation_entity_test_insert__pre-transaction_entity_test_list')); $this->assertFalse(\Drupal::cache()->get('delay_cache_tags_invalidation_entity_test_insert__during_transaction_entity_test_list')); $this->assertFalse(\Drupal::state()->get('delay_cache_tags_invalidation_user_insert__during_transaction_entity_test_list')); - $this->assertFalse(\Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); + $this->assertFalse(\Drupal::cache()->get('test_cache_pre-transaction_entity_test_list')); } /** @@ -128,9 +126,9 @@ public function testEntitySave(): void { */ public function testEntitySaveRollback(): void { \Drupal::cache() - ->set('test_cache_pretransaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); + ->set('test_cache_pre-transaction_entity_test_list', 'something', Cache::PERMANENT, ['entity_test_list']); \Drupal::cache() - ->set('test_cache_pretransaction_user_list', 'something', Cache::PERMANENT, ['user_list']); + ->set('test_cache_pre-transaction_user_list', 'something', Cache::PERMANENT, ['user_list']); \Drupal::state()->set('delay_cache_tags_invalidation_exception', TRUE); @@ -143,8 +141,8 @@ public function testEntitySaveRollback(): void { } // The cache has not been invalidated. - $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); - $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pretransaction_user_list')); + $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pre-transaction_entity_test_list')); + $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pre-transaction_user_list')); // Save a user, that should invalidate the cache tagged with user_list but // not the one with entity_test_list. @@ -153,8 +151,8 @@ public function testEntitySaveRollback(): void { 'status' => 1, ])->save(); - $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pretransaction_entity_test_list')); - $this->assertFalse(\Drupal::cache()->get('test_cache_pretransaction_user_list')); + $this->assertNotEmpty(\Drupal::cache()->get('test_cache_pre-transaction_entity_test_list')); + $this->assertFalse(\Drupal::cache()->get('test_cache_pre-transaction_user_list')); } /** diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php index 836b2f65797a1d8b061e255ba46a40b0039105d8..b20789bd9e3cd32e242d20a2bdf87d91195281ac 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php @@ -40,7 +40,7 @@ public function testDefaultJoin(): void { foreach ($result as $record) { $num_records++; $this->assertGreaterThanOrEqual($last_priority, $record->$priority_field); - $this->assertNotSame('Ringo', $record->$name_field, 'Taskless person not selected.'); + $this->assertNotSame('Ringo', $record->$name_field, 'Person without a task not selected.'); $last_priority = $record->$priority_field; } @@ -418,7 +418,7 @@ public function testJoinConditionObject(): void { $num_records++; // Verify that the results are returned in the correct order. $this->assertGreaterThanOrEqual($last_priority, $record->$priority_field); - $this->assertNotSame('Ringo', $record->$name_field, 'Taskless person not selected.'); + $this->assertNotSame('Ringo', $record->$name_field, 'Person without a task not selected.'); $last_priority = $record->$priority_field; } diff --git a/core/tests/Drupal/Nightwatch/Tests/jQueryUIPositionShimTest.js b/core/tests/Drupal/Nightwatch/Tests/jQueryUIPositionShimTest.js index 8506e296e4b4d58f840eadd3f83d61d36a87f37b..5a996016f6cef14c4a20665ecbb7c46ca55ec1b1 100644 --- a/core/tests/Drupal/Nightwatch/Tests/jQueryUIPositionShimTest.js +++ b/core/tests/Drupal/Nightwatch/Tests/jQueryUIPositionShimTest.js @@ -1414,7 +1414,7 @@ module.exports = { const $ = jQuery; const toReturn = {}; let count = 0; - const elems = $('#el1, #el2'); + const elements = $('#el1, #el2'); const of = $('#parentX'); const expectedPosition = { top: 60, left: 60 }; const expectedFeedback = { @@ -1435,7 +1435,7 @@ module.exports = { vertical: 'top', important: 'vertical', }; - const originalPosition = elems + const originalPosition = elements .position({ my: 'right bottom', at: 'right bottom', @@ -1444,14 +1444,14 @@ module.exports = { }) .offset(); - elems.position({ + elements.position({ my: 'left top', at: 'center+10 bottom', of: '#parentX', using(position, feedback) { toReturn[`correct context for call #${count}`] = { actual: this, - expected: elems[count], + expected: elements[count], }; toReturn[`correct position for call #${count}`] = { actual: position, @@ -1459,9 +1459,9 @@ module.exports = { }; toReturn[`feedback and element match for call #${count}`] = { actual: feedback.element.element[0], - expected: elems[count], + expected: elements[count], }; - // assert.deepEqual(feedback.element.element[0], elems[count]); + // assert.deepEqual(feedback.element.element[0], elements[count]); delete feedback.element.element; toReturn[`expected feedback after delete for call #${count}`] = { actual: feedback, @@ -1472,7 +1472,7 @@ module.exports = { }); // eslint-disable-next-line func-names - elems.each(function (index) { + elements.each(function (index) { toReturn[`elements not moved: ${index}`] = { actual: $(this).offset(), expected: originalPosition, diff --git a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php index 74ba7f14dfd2740811448fccad47afb8efd854fc..fc463f162a4c19d3e1889726e144a2c774bc5c6b 100644 --- a/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +++ b/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php @@ -923,11 +923,11 @@ public function testGetPhpDateTime(): void { // Test retrieving a cloned copy of the wrapped \DateTime object, and that // altering it does not change the DateTimePlus object. - $datetimeplus = DateTimePlus::createFromFormat('Y-m-d H:i:s', '2017-07-13 22:40:00', $new_york, ['langcode' => 'en']); - $this->assertEquals(1500000000, $datetimeplus->getTimestamp()); - $this->assertEquals('America/New_York', $datetimeplus->getTimezone()->getName()); + $date_time_plus = DateTimePlus::createFromFormat('Y-m-d H:i:s', '2017-07-13 22:40:00', $new_york, ['langcode' => 'en']); + $this->assertEquals(1500000000, $date_time_plus->getTimestamp()); + $this->assertEquals('America/New_York', $date_time_plus->getTimezone()->getName()); - $datetime = $datetimeplus->getPhpDateTime(); + $datetime = $date_time_plus->getPhpDateTime(); $this->assertInstanceOf('DateTime', $datetime); $this->assertEquals(1500000000, $datetime->getTimestamp()); $this->assertEquals('America/New_York', $datetime->getTimezone()->getName()); @@ -935,8 +935,8 @@ public function testGetPhpDateTime(): void { $datetime->setTimestamp(1400000000)->setTimezone($berlin); $this->assertEquals(1400000000, $datetime->getTimestamp()); $this->assertEquals('Europe/Berlin', $datetime->getTimezone()->getName()); - $this->assertEquals(1500000000, $datetimeplus->getTimestamp()); - $this->assertEquals('America/New_York', $datetimeplus->getTimezone()->getName()); + $this->assertEquals(1500000000, $date_time_plus->getTimestamp()); + $this->assertEquals('America/New_York', $date_time_plus->getTimezone()->getName()); } } diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index 830772284ebb19087be1792fa197b54019f8c99e..e731afbc6120fe25a1b902f4eed85b23c9de6864 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -294,9 +294,9 @@ public function testVersion(): void { $libraries = $this->libraryDiscoveryParser->buildByExtension('versions'); - $this->assertArrayNotHasKey('version', $libraries['versionless']); - $this->assertEquals(-1, $libraries['versionless']['css'][0]['version']); - $this->assertEquals(-1, $libraries['versionless']['js'][0]['version']); + $this->assertArrayNotHasKey('version', $libraries['no_version']); + $this->assertEquals(-1, $libraries['no_version']['css'][0]['version']); + $this->assertEquals(-1, $libraries['no_version']['js'][0]['version']); $this->assertEquals('9.8.7.6', $libraries['versioned']['version']); $this->assertEquals('9.8.7.6', $libraries['versioned']['css'][0]['version']); diff --git a/core/tests/Drupal/Tests/Core/Asset/library_test_files/versions.libraries.yml b/core/tests/Drupal/Tests/Core/Asset/library_test_files/versions.libraries.yml index 7310a09c56c47b2877f7810cdac156b94feeeb7f..a227c580497dab5675fbea3f39916f3cba865cd8 100644 --- a/core/tests/Drupal/Tests/Core/Asset/library_test_files/versions.libraries.yml +++ b/core/tests/Drupal/Tests/Core/Asset/library_test_files/versions.libraries.yml @@ -1,9 +1,9 @@ -versionless: +no_version: css: theme: - versionless.css: {} + no_version.css: {} js: - versionless.js: {} + no_version.js: {} versioned: version: "9.8.7.6" diff --git a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php index 279f92729a2d4980fc88b8e762b411f85ad384f7..de218a1a92e1aafa93ec8ed0604e139a2e413d03 100644 --- a/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php @@ -22,7 +22,7 @@ class VariationCacheTest extends UnitTestCase { /** - * The prophesized request stack. + * The mock request stack. * * @var \Symfony\Component\HttpFoundation\RequestStack|\Prophecy\Prophecy\ProphecyInterface */ @@ -36,7 +36,7 @@ class VariationCacheTest extends UnitTestCase { protected $memoryBackend; /** - * The prophesized cache contexts manager. + * The mock cache contexts manager. * * @var \Drupal\Core\Cache\Context\CacheContextsManager|\Prophecy\Prophecy\ProphecyInterface */ diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php index f3cf79f511845a9a0f2c1f671dab4a07cae55c90..9e9cdcfdd994eae3b047e5885891d7c9540d433f 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php @@ -116,10 +116,10 @@ public function testAccessWithDifferentRouteParameters(): void { * Wrap any object with a route match, and return that. * * @param object $object - * Any object, including prophesized mocks based on interfaces. + * Any object, including mocks based on interfaces. * * @return \Drupal\Core\Routing\RouteMatchInterface - * A prophesized RouteMatchInterface. + * A mock RouteMatchInterface. */ private function createRouteMatchForObject(\stdClass $object) { $route_match = $this->prophesize(RouteMatchInterface::class); diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php index 40ffea78bd74ced904a4f3e2cc99128a669adeaf..4b1f63eec4eeb0baef8d8d0652d6e21c3780fa89 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php @@ -476,9 +476,9 @@ public function testUriRelationships(): void { protected function getEntity(string $class, array $values, array $methods = []): StubEntityBase&MockObject { $methods = array_merge($methods, ['getEntityType', 'entityTypeBundleInfo']); - // Prophecy does not allow prophesizing abstract classes while actually - // calling their code. We use Prophecy below because that allows us to - // add method prophecies later while still revealing the prophecy now. + // Prophecy does not allow mocking abstract classes while actually calling + // their code. We use Prophecy below because that allows us to add method + // prophecies later while still revealing the prophecy now. $entity = $this->getMockBuilder($class) ->setConstructorArgs([$values, static::ENTITY_TYPE_ID]) ->onlyMethods($methods)