You are here

public function FeedExpireHandlerTest::testBatchExpire in Feeds 8.3

@covers ::startBatchExpire

File

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

Class

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

Namespace

Drupal\Tests\feeds\Unit

Code

public function testBatchExpire() {
  $this->feed
    ->expects($this
    ->once())
    ->method('lock')
    ->will($this
    ->returnValue($this->feed));
  $this->handler
    ->expects($this
    ->once())
    ->method('getExpiredIds')
    ->will($this
    ->returnValue([
    1,
  ]));
  $this->handler
    ->startBatchExpire($this->feed);
}