You are here

public function FeedsExJsonPathLinesUnitTests::testSimpleParsing in Feeds extensible parsers 7.2

Tests simple parsing.

File

src/Tests/FeedsExJsonPathLines.test, line 66
Contains FeedsExJsonPathLinesUnitTests.

Class

FeedsExJsonPathLinesUnitTests
Unit tests for FeedsExJsonPathLines.

Code

public function testSimpleParsing() {
  $result = $this->parser
    ->parse($this->source, $this->fetcherResult);
  $this
    ->assertEqual(count($result->items), 4, format_string('@count items parsed.', array(
    '@count' => count($result->items),
  )));
  foreach (array(
    'Gilbert',
    'Alexa',
    'May',
    'Deloise',
  ) as $delta => $name) {
    $this
      ->assertEqual($name, $result->items[$delta]['title']);
  }
}