You are here

public function XmlParserTest::_testLinkIsSet in Feeds extensible parsers 8

Tests that the link property is set.

@todo replace setProperty().

File

tests/src/Unit/Feeds/Parser/XmlParserTest.php, line 242

Class

XmlParserTest
@coversDefaultClass \Drupal\feeds_ex\Feeds\Parser\XmlParser @group feeds_ex

Namespace

Drupal\Tests\feeds_ex\Unit\Feeds\Parser

Code

public function _testLinkIsSet() {
  $this
    ->setProperty($this->feed, 'config', [
    'FeedsFileFetcher' => [
      'source' => 'file fetcher source path',
    ],
  ]);
  $this->parser = $this
    ->getParserInstance();
  $this->parser
    ->setConfiguration([
    'context' => [
      'value' => '/beep',
    ],
  ]);
  $result = $this->parser
    ->parse($this->feed, new RawFetcherResult('<?xml version="1.0" encoding="UTF-8"?><item></item>', $this->fileSystem));
  $this
    ->assertSame($result->link, 'file fetcher source path');
}