public function FeedRefreshTest::testFinalPass in Feeds 8.3
Tests the final stage of an import.
File
- tests/
src/ Unit/ Plugin/ QueueWorker/ FeedRefreshTest.php, line 217
Class
- FeedRefreshTest
- @coversDefaultClass \Drupal\feeds\Plugin\QueueWorker\FeedRefresh @group feeds
Namespace
Drupal\Tests\feeds\Unit\Plugin\QueueWorkerCode
public function testFinalPass() {
$this->plugin
->processItem([
$this->feed,
FeedsExecutableInterface::FINISH,
[
'fetcher_result' => new FetcherResult(''),
],
]);
$this->feed
->expects($this
->exactly(2))
->method('progressParsing')
->will($this
->returnValue(StateInterface::BATCH_COMPLETE));
$this->plugin
->processItem([
$this->feed,
FeedsExecutableInterface::FINISH,
[
'fetcher_result' => new FetcherResult(''),
],
]);
$this->feed
->expects($this
->once())
->method('progressFetching')
->will($this
->returnValue(StateInterface::BATCH_COMPLETE));
$this->plugin
->processItem([
$this->feed,
FeedsExecutableInterface::FINISH,
[
'fetcher_result' => new FetcherResult(''),
],
]);
}