protected function FpmTestBase::getFeedTypeMock in Feeds Paragraphs 8
Creates feed type entity.
Return value
\Drupal\feeds\FeedTypeInterface A mocked feed type entity.
2 calls to FpmTestBase::getFeedTypeMock()
- FpmTestBase::getFeedMock in tests/
src/ Unit/ FpmTestBase.php - Returns a mocked feed entity.
- FpmTestBase::initWrapper in tests/
src/ Unit/ FpmTestBase.php - Instantiates and returns a WrapperTarget object.
File
- tests/
src/ Unit/ FpmTestBase.php, line 204
Class
Namespace
Drupal\Tests\feeds_para_mapper\UnitCode
protected function getFeedTypeMock() {
$feed_type = $this
->createMock(FeedTypeInterface::class);
$processor = $this
->getProcessorMock();
$feed_type->id = 'test_feed_type';
$feed_type->description = 'This is a test feed type';
$feed_type->label = 'Test feed type';
$feed_type
->expects($this
->any())
->method('label')
->will($this
->returnValue($feed_type->label));
$feed_type
->expects($this
->any())
->method('getProcessor')
->will($this
->returnValue($processor));
return $feed_type;
}