protected function FeedsMockingTrait::getMockFeedType in Feeds 8.3
Returns a mocked feed type entity.
Return value
\Drupal\feeds\FeedTypeInterface A mocked feed type entity.
1 call to FeedsMockingTrait::getMockFeedType()
- FeedsMockingTrait::getMockFeed in tests/
src/ Traits/ FeedsMockingTrait.php - Returns a mocked feed entity.
File
- tests/
src/ Traits/ FeedsMockingTrait.php, line 26
Class
- FeedsMockingTrait
- Provides methods for mocking certain Feeds classes.
Namespace
Drupal\Tests\feeds\TraitsCode
protected function getMockFeedType() {
$feed_type = $this
->createMock(FeedTypeInterface::class);
$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));
return $feed_type;
}