public function SitemapParserTest::setUp in Feeds 8.3
Overrides FeedsUnitTestCase::setUp
File
- tests/
src/ Unit/ Feeds/ Parser/ SitemapParserTest.php, line 49
Class
- SitemapParserTest
- @coversDefaultClass \Drupal\feeds\Feeds\Parser\SitemapParser @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\ParserCode
public function setUp() {
parent::setUp();
$this->feedType = $this
->createMock('Drupal\\feeds\\FeedTypeInterface');
$configuration = [
'feed_type' => $this->feedType,
];
$this->parser = new SitemapParser($configuration, 'sitemap', []);
$this->parser
->setStringTranslation($this
->getStringTranslationStub());
$this->state = new State();
$this->feed = $this
->createMock('Drupal\\feeds\\FeedInterface');
$this->feed
->expects($this
->any())
->method('getType')
->will($this
->returnValue($this->feedType));
}