function FeedParserTest::testHtmlEntitiesSample

Same name and namespace in other branches
  1. 8.9.x 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 90

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&");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.