You are here

public function OpmlParserTest::setUp in Feeds 8.3

Overrides FeedsUnitTestCase::setUp

File

tests/src/Unit/Feeds/Parser/OpmlParserTest.php, line 47

Class

OpmlParserTest
@coversDefaultClass \Drupal\feeds\Feeds\Parser\OpmlParser @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Parser

Code

public function setUp() {
  parent::setUp();
  $this->feedType = $this
    ->createMock('Drupal\\feeds\\FeedTypeInterface');
  $configuration = [
    'feed_type' => $this->feedType,
  ];
  $this->parser = new OpmlParser($configuration, 'sitemap', []);
  $this->parser
    ->setStringTranslation($this
    ->getStringTranslationStub());
  $this->feed = $this
    ->createMock('Drupal\\feeds\\FeedInterface');
  $this->feed
    ->expects($this
    ->any())
    ->method('getType')
    ->will($this
    ->returnValue($this->feedType));
  $this->state = $this
    ->createMock('Drupal\\feeds\\StateInterface');
}