Loading core/phpcs.xml.dist +7 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ <include-pattern>core/modules/*/Plugin/*</include-pattern> <include-pattern>core/modules/*/Form/*</include-pattern> <include-pattern>core/tests/Drupal/Tests/Component/*</include-pattern> <include-pattern>core/tests/Drupal/BuildTests/*</include-pattern> <include-pattern>core/tests/Drupal/FunctionalJavascriptTests/*</include-pattern> <include-pattern>core/tests/Drupal/FunctionalTests/*</include-pattern> <include-pattern>core/tests/Drupal/Nightwatch/*</include-pattern> <include-pattern>core/tests/Drupal/TestSite/*</include-pattern> <include-pattern>core/tests/Drupal/TestTools/*</include-pattern> <include-pattern>core/tests/Drupal/Tests/Core/*</include-pattern> </rule> <rule ref="Drupal.Classes.ClassCreateInstance"/> <rule ref="Drupal.Classes.ClassDeclaration"/> Loading core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php +6 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,12 @@ public function testTranslatableEntities(): void { $assert->responseContains('1 item has not been deleted because you do not have the necessary permissions.'); \Drupal::entityTypeManager()->getStorage('entity_test_mulrevpub')->resetCache(); $remaining_entities = EntityTestMulRevPub::loadMultiple([$entity1->id(), $entity2->id(), $entity3->id(), $entity4->id()]); $remaining_entities = EntityTestMulRevPub::loadMultiple([ $entity1->id(), $entity2->id(), $entity3->id(), $entity4->id(), ]); $this->assertCount(3, $remaining_entities); } Loading core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,14 @@ protected function setUp(): void { */ public function testBundleListingCache(): void { // Access to lists of test entities with each bundle. $bundle_a_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_a']); $bundle_b_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_b']); $bundle_a_url = Url::fromRoute('cache_test_list.bundle_tags', [ 'entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_a', ]); $bundle_b_url = Url::fromRoute('cache_test_list.bundle_tags', [ 'entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_b', ]); $this->drupalGet($bundle_a_url); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS'); $this->assertCacheTags(['rendered', 'entity_test_with_bundle_list:bundle_a']); Loading core/tests/Drupal/FunctionalTests/MailCaptureTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,11 @@ public function testMailSend(): void { $this->assertCount(1, $captured_emails, 'Only one email is returned when filtering by id.'); $captured_emails = $this->drupalGetMails(['id' => 'drupal_mail_test', 'subject' => $subject]); $this->assertCount(1, $captured_emails, 'Only one email is returned when filtering by id and subject.'); $captured_emails = $this->drupalGetMails(['id' => 'drupal_mail_test', 'subject' => $subject, 'from' => 'this_was_not_used@example.com']); $captured_emails = $this->drupalGetMails([ 'id' => 'drupal_mail_test', 'subject' => $subject, 'from' => 'this_was_not_used@example.com', ]); $this->assertCount(0, $captured_emails, 'No emails are returned when querying with an unused from address.'); // Send the last email again, so we can confirm that the Loading core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php +4 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,10 @@ protected function tearDown(TestDatabase $test_database, $db_url): void { array_walk($tables, [$schema, 'dropTable']); // Delete test site directory. $this->fileUnmanagedDeleteRecursive($root . DIRECTORY_SEPARATOR . $test_database->getTestSitePath(), [BrowserTestBase::class, 'filePreDeleteCallback']); $this->fileUnmanagedDeleteRecursive( $root . DIRECTORY_SEPARATOR . $test_database->getTestSitePath(), [BrowserTestBase::class, 'filePreDeleteCallback'] ); } /** Loading Loading
core/phpcs.xml.dist +7 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ <include-pattern>core/modules/*/Plugin/*</include-pattern> <include-pattern>core/modules/*/Form/*</include-pattern> <include-pattern>core/tests/Drupal/Tests/Component/*</include-pattern> <include-pattern>core/tests/Drupal/BuildTests/*</include-pattern> <include-pattern>core/tests/Drupal/FunctionalJavascriptTests/*</include-pattern> <include-pattern>core/tests/Drupal/FunctionalTests/*</include-pattern> <include-pattern>core/tests/Drupal/Nightwatch/*</include-pattern> <include-pattern>core/tests/Drupal/TestSite/*</include-pattern> <include-pattern>core/tests/Drupal/TestTools/*</include-pattern> <include-pattern>core/tests/Drupal/Tests/Core/*</include-pattern> </rule> <rule ref="Drupal.Classes.ClassCreateInstance"/> <rule ref="Drupal.Classes.ClassDeclaration"/> Loading
core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php +6 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,12 @@ public function testTranslatableEntities(): void { $assert->responseContains('1 item has not been deleted because you do not have the necessary permissions.'); \Drupal::entityTypeManager()->getStorage('entity_test_mulrevpub')->resetCache(); $remaining_entities = EntityTestMulRevPub::loadMultiple([$entity1->id(), $entity2->id(), $entity3->id(), $entity4->id()]); $remaining_entities = EntityTestMulRevPub::loadMultiple([ $entity1->id(), $entity2->id(), $entity3->id(), $entity4->id(), ]); $this->assertCount(3, $remaining_entities); } Loading
core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,14 @@ protected function setUp(): void { */ public function testBundleListingCache(): void { // Access to lists of test entities with each bundle. $bundle_a_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_a']); $bundle_b_url = Url::fromRoute('cache_test_list.bundle_tags', ['entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_b']); $bundle_a_url = Url::fromRoute('cache_test_list.bundle_tags', [ 'entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_a', ]); $bundle_b_url = Url::fromRoute('cache_test_list.bundle_tags', [ 'entity_type_id' => 'entity_test_with_bundle', 'bundle' => 'bundle_b', ]); $this->drupalGet($bundle_a_url); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS'); $this->assertCacheTags(['rendered', 'entity_test_with_bundle_list:bundle_a']); Loading
core/tests/Drupal/FunctionalTests/MailCaptureTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,11 @@ public function testMailSend(): void { $this->assertCount(1, $captured_emails, 'Only one email is returned when filtering by id.'); $captured_emails = $this->drupalGetMails(['id' => 'drupal_mail_test', 'subject' => $subject]); $this->assertCount(1, $captured_emails, 'Only one email is returned when filtering by id and subject.'); $captured_emails = $this->drupalGetMails(['id' => 'drupal_mail_test', 'subject' => $subject, 'from' => 'this_was_not_used@example.com']); $captured_emails = $this->drupalGetMails([ 'id' => 'drupal_mail_test', 'subject' => $subject, 'from' => 'this_was_not_used@example.com', ]); $this->assertCount(0, $captured_emails, 'No emails are returned when querying with an unused from address.'); // Send the last email again, so we can confirm that the Loading
core/tests/Drupal/TestSite/Commands/TestSiteTearDownCommand.php +4 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,10 @@ protected function tearDown(TestDatabase $test_database, $db_url): void { array_walk($tables, [$schema, 'dropTable']); // Delete test site directory. $this->fileUnmanagedDeleteRecursive($root . DIRECTORY_SEPARATOR . $test_database->getTestSitePath(), [BrowserTestBase::class, 'filePreDeleteCallback']); $this->fileUnmanagedDeleteRecursive( $root . DIRECTORY_SEPARATOR . $test_database->getTestSitePath(), [BrowserTestBase::class, 'filePreDeleteCallback'] ); } /** Loading