You are here

protected function FeedsMockingTrait::getMockFeed in Feeds 8.3

Returns a mocked feed entity.

Return value

\Drupal\feeds\FeedInterface A mocked feed entity.

2 calls to FeedsMockingTrait::getMockFeed()
FeedQueueWorkerBaseTest::test in tests/src/Unit/Plugin/QueueWorker/FeedQueueWorkerBaseTest.php
Tests various methods on the FeedQueueWorkerBase class.
FeedRefreshTest::setUp in tests/src/Unit/Plugin/QueueWorker/FeedRefreshTest.php

File

tests/src/Traits/FeedsMockingTrait.php, line 44

Class

FeedsMockingTrait
Provides methods for mocking certain Feeds classes.

Namespace

Drupal\Tests\feeds\Traits

Code

protected function getMockFeed() {
  $feed = $this
    ->createMock(FeedInterface::class);
  $feed
    ->expects($this
    ->any())
    ->method('getType')
    ->will($this
    ->returnValue($this
    ->getMockFeedType()));
  return $feed;
}