You are here

public function FeedParserTest::testHtmlEntitiesSample in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/tests/src/Functional/FeedParserTest.php \Drupal\Tests\aggregator\Functional\FeedParserTest::testHtmlEntitiesSample()

Tests a feed that uses HTML entities in item titles.

File

core/modules/aggregator/tests/src/Functional/FeedParserTest.php, line 89

Class

FeedParserTest
Tests the built-in feed parser with valid feed samples.

Namespace

Drupal\Tests\aggregator\Functional

Code

public function testHtmlEntitiesSample() {
  $feed = $this
    ->createFeed($this
    ->getHtmlEntitiesSample());
  $feed
    ->refreshItems();
  $this
    ->drupalGet('aggregator/sources/' . $feed
    ->id());
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertSession()
    ->responseContains("Quote" Amp&");
}