You are here

public function FeedParserTest::testHtmlEntitiesSample in Drupal 8

Same name and namespace in other branches
  1. 9 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 83

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
    ->assertRaw("Quote" Amp&");
}