Loading core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -65,25 +65,25 @@ public function testStringFormatter() { $build = $aggregator_feed->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => TRUE]]); $result = $this->render($build); $this->assertContains('testing title', $result); $this->assertContains('href="' . $aggregator_feed->getUrl() . '"', $result); $this->assertStringContainsString('testing title', $result); $this->assertStringContainsString('href="' . $aggregator_feed->getUrl() . '"', $result); $build = $aggregator_feed->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]); $result = $this->render($build); $this->assertContains('testing title', $result); $this->assertNotContains($aggregator_feed->getUrl(), $result); $this->assertStringContainsString('testing title', $result); $this->assertStringNotContainsString($aggregator_feed->getUrl(), $result); // Verify aggregator item title with and without links. $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => TRUE]]); $result = $this->render($build); $this->assertContains('test title', $result); $this->assertContains('href="' . $aggregator_item->getLink() . '"', $result); $this->assertStringContainsString('test title', $result); $this->assertStringContainsString('href="' . $aggregator_item->getLink() . '"', $result); $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]); $result = $this->render($build); $this->assertContains('test title', $result); $this->assertNotContains($aggregator_item->getLink(), $result); $this->assertStringContainsString('test title', $result); $this->assertStringNotContainsString($aggregator_item->getLink(), $result); } } core/modules/comment/tests/src/Functional/CommentTitleTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public function testCommentPopulatedTitles() { $comment_permalink = $this->cssSelect('.permalink'); $comment_permalink = $comment_permalink[0]->getAttribute('href'); // Tests that the comment's title link contains the url fragment. $this->assertContains('#comment-' . $comment1->id(), $comment_permalink, "The comment's title link contains the url fragment."); $this->assertStringContainsString('#comment-' . $comment1->id(), $comment_permalink, "The comment's title link contains the url fragment."); $this->assertEqual($comment1->permalink()->toString(), $comment_permalink, "The comment's title has the correct link."); } Loading core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ protected function copyTestingOverrides() { */ public function testInstalled() { if ($this->expectedException) { $this->assertContains('Configuration objects provided by <em class="placeholder">testing_config_overrides</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (does_not_exist)</em>', $this->expectedException->getMessage()); $this->assertContains('Drupal\Core\Config\UnmetDependenciesException', $this->expectedException->getMessage()); $this->assertStringContainsString('Configuration objects provided by <em class="placeholder">testing_config_overrides</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (does_not_exist)</em>', $this->expectedException->getMessage()); $this->assertStringContainsString('Drupal\Core\Config\UnmetDependenciesException', $this->expectedException->getMessage()); } else { $this->fail('Expected Drupal\Core\Config\UnmetDependenciesException exception not thrown'); Loading core/modules/contact/tests/src/Functional/ContactSitewideTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -329,8 +329,8 @@ public function testSiteWideContact() { $mails = $this->getMails(); $mail = array_pop($mails); $this->assertEqual($mail['subject'], t('[@label] @subject', ['@label' => $label, '@subject' => $edit['subject[0][value]']])); $this->assertContains($field_label, $mail['body']); $this->assertContains($edit[$field_name . '[0][value]'], $mail['body']); $this->assertStringContainsString($field_label, $mail['body']); $this->assertStringContainsString($edit[$field_name . '[0][value]'], $mail['body']); // Test messages and redirect. /** @var \Drupal\contact\ContactFormInterface $form */ Loading core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public function testContentTranslationContextualLinks() { $this->drupalLogin($this->translator); $this->drupalGet('node/' . $node->id()); $link = $this->assertSession()->waitForElement('css', '[data-contextual-id^="node:node=1"] .contextual-links a:contains("Translate")'); $this->assertContains('node/1/translations', $link->getAttribute('href')); $this->assertStringContainsString('node/1/translations', $link->getAttribute('href')); } } Loading
core/modules/aggregator/tests/src/Kernel/AggregatorTitleTest.php +8 −8 Original line number Diff line number Diff line Loading @@ -65,25 +65,25 @@ public function testStringFormatter() { $build = $aggregator_feed->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => TRUE]]); $result = $this->render($build); $this->assertContains('testing title', $result); $this->assertContains('href="' . $aggregator_feed->getUrl() . '"', $result); $this->assertStringContainsString('testing title', $result); $this->assertStringContainsString('href="' . $aggregator_feed->getUrl() . '"', $result); $build = $aggregator_feed->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]); $result = $this->render($build); $this->assertContains('testing title', $result); $this->assertNotContains($aggregator_feed->getUrl(), $result); $this->assertStringContainsString('testing title', $result); $this->assertStringNotContainsString($aggregator_feed->getUrl(), $result); // Verify aggregator item title with and without links. $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => TRUE]]); $result = $this->render($build); $this->assertContains('test title', $result); $this->assertContains('href="' . $aggregator_item->getLink() . '"', $result); $this->assertStringContainsString('test title', $result); $this->assertStringContainsString('href="' . $aggregator_item->getLink() . '"', $result); $build = $aggregator_item->{$this->fieldName}->view(['type' => 'aggregator_title', 'settings' => ['display_as_link' => FALSE]]); $result = $this->render($build); $this->assertContains('test title', $result); $this->assertNotContains($aggregator_item->getLink(), $result); $this->assertStringContainsString('test title', $result); $this->assertStringNotContainsString($aggregator_item->getLink(), $result); } }
core/modules/comment/tests/src/Functional/CommentTitleTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public function testCommentPopulatedTitles() { $comment_permalink = $this->cssSelect('.permalink'); $comment_permalink = $comment_permalink[0]->getAttribute('href'); // Tests that the comment's title link contains the url fragment. $this->assertContains('#comment-' . $comment1->id(), $comment_permalink, "The comment's title link contains the url fragment."); $this->assertStringContainsString('#comment-' . $comment1->id(), $comment_permalink, "The comment's title link contains the url fragment."); $this->assertEqual($comment1->permalink()->toString(), $comment_permalink, "The comment's title has the correct link."); } Loading
core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ protected function copyTestingOverrides() { */ public function testInstalled() { if ($this->expectedException) { $this->assertContains('Configuration objects provided by <em class="placeholder">testing_config_overrides</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (does_not_exist)</em>', $this->expectedException->getMessage()); $this->assertContains('Drupal\Core\Config\UnmetDependenciesException', $this->expectedException->getMessage()); $this->assertStringContainsString('Configuration objects provided by <em class="placeholder">testing_config_overrides</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (does_not_exist)</em>', $this->expectedException->getMessage()); $this->assertStringContainsString('Drupal\Core\Config\UnmetDependenciesException', $this->expectedException->getMessage()); } else { $this->fail('Expected Drupal\Core\Config\UnmetDependenciesException exception not thrown'); Loading
core/modules/contact/tests/src/Functional/ContactSitewideTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -329,8 +329,8 @@ public function testSiteWideContact() { $mails = $this->getMails(); $mail = array_pop($mails); $this->assertEqual($mail['subject'], t('[@label] @subject', ['@label' => $label, '@subject' => $edit['subject[0][value]']])); $this->assertContains($field_label, $mail['body']); $this->assertContains($edit[$field_name . '[0][value]'], $mail['body']); $this->assertStringContainsString($field_label, $mail['body']); $this->assertStringContainsString($edit[$field_name . '[0][value]'], $mail['body']); // Test messages and redirect. /** @var \Drupal\contact\ContactFormInterface $form */ Loading
core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public function testContentTranslationContextualLinks() { $this->drupalLogin($this->translator); $this->drupalGet('node/' . $node->id()); $link = $this->assertSession()->waitForElement('css', '[data-contextual-id^="node:node=1"] .contextual-links a:contains("Translate")'); $this->assertContains('node/1/translations', $link->getAttribute('href')); $this->assertStringContainsString('node/1/translations', $link->getAttribute('href')); } }