You are here

public function ItemWarmerTest::testProcessItem in Warmer 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/Plugin/QueueWorker/ItemWarmerTest.php \Drupal\Tests\warmer\Unit\Plugin\QueueWorker\ItemWarmerTest::testProcessItem()

The data is processed when appropriate @covers ::processItem

File

tests/src/Unit/Plugin/QueueWorker/ItemWarmerTest.php, line 29

Class

ItemWarmerTest
@coversDefaultClass \Drupal\warmer\Plugin\QueueWorker\ItemWarmer @group warmer

Namespace

Drupal\Tests\warmer\Unit\Plugin\QueueWorker

Code

public function testProcessItem() {
  $data = $this
    ->prophesize(QueueData::class);
  $data
    ->process()
    ->shouldBeCalledTimes(1);
  $this->sut
    ->processItem($data
    ->reveal());
  $this->sut
    ->processItem(NULL);
}