You are here

public function FeedParserTest::testHtmlEntitiesSample in Zircon Profile 8.0

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

Tests a feed that uses HTML entities in item titles.

File

core/modules/aggregator/src/Tests/FeedParserTest.php, line 79
Contains \Drupal\aggregator\Tests\FeedParserTest.

Class

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

Namespace

Drupal\aggregator\Tests

Code

public function testHtmlEntitiesSample() {
  $feed = $this
    ->createFeed($this
    ->getHtmlEntitiesSample());
  $feed
    ->refreshItems();
  $this
    ->drupalGet('aggregator/sources/' . $feed
    ->id());
  $this
    ->assertResponse(200, format_string('Feed %name exists.', array(
    '%name' => $feed
      ->label(),
  )));
  $this
    ->assertRaw("Quote" Amp&");
}