You are here

public function FeedsExecutableTest::testImport in Feeds 8.3

@covers ::doFetch @covers ::doParse @covers ::doProcess

File

tests/src/Unit/FeedsExecutableTest.php, line 66

Class

FeedsExecutableTest
@coversDefaultClass \Drupal\feeds\FeedsExecutable @group feeds

Namespace

Drupal\Tests\feeds\Unit

Code

public function testImport() {
  $this
    ->addDefaultEventListeners();
  $this->feed
    ->expects($this
    ->once())
    ->method('progressParsing')
    ->willReturn(StateInterface::BATCH_COMPLETE);
  $this->feed
    ->expects($this
    ->once())
    ->method('progressFetching')
    ->willReturn(StateInterface::BATCH_COMPLETE);
  $this->feed
    ->expects($this
    ->once())
    ->method('progressCleaning')
    ->willReturn(StateInterface::BATCH_COMPLETE);
  $this->feed
    ->expects($this
    ->exactly(3))
    ->method('saveStates');
  $this->executable
    ->processItem($this->feed, FeedsExecutable::BEGIN);
}