You are here

public function FeedExpireHandlerTest::setUp in Feeds 8.3

Overrides FeedsUnitTestCase::setUp

File

tests/src/Unit/FeedExpireHandlerTest.php, line 43

Class

FeedExpireHandlerTest
@coversDefaultClass \Drupal\feeds\FeedExpireHandler @group feeds

Namespace

Drupal\Tests\feeds\Unit

Code

public function setUp() {
  parent::setUp();
  $this->dispatcher = new EventDispatcher();
  $this->feed = $this
    ->createMock(FeedInterface::class);
  $this->handler = $this
    ->getMockBuilder(FeedExpireHandler::class)
    ->setMethods([
    'getExpiredIds',
    'batchSet',
  ])
    ->setConstructorArgs([
    $this->dispatcher,
  ])
    ->getMock();
  $this->handler
    ->setStringTranslation($this
    ->createMock(TranslationInterface::class));
  $this->handler
    ->setMessenger($this
    ->createMock(MessengerInterface::class));
}