You are here

public function ServiceTest::testEmptyQueue in Purge 8.3

Tests \Drupal\purge\Plugin\Purge\Queue\QueueService::emptyQueue.

File

tests/src/Kernel/Queue/ServiceTest.php, line 109

Class

ServiceTest
Tests \Drupal\purge\Plugin\Purge\Queue\QueueService.

Namespace

Drupal\Tests\purge\Kernel\Queue

Code

public function testEmptyQueue() : void {
  $this->service
    ->add($this->queuer, $this
    ->getInvalidations(10));
  $this->service
    ->emptyQueue();
  $this
    ->assertTrue(empty($this->service
    ->claim(10, 10)));
  $this
    ->assertTrue(is_int($this->service
    ->numberOfItems()));
  $this
    ->assertEquals(0, $this->service
    ->numberOfItems());
}