You are here

public function PluginTestBase::testCreateQueue in Purge 8.3

Test that createQueue() doesn't empty the queue if already created.

File

tests/src/Kernel/Queue/PluginTestBase.php, line 119

Class

PluginTestBase
Provides a abstract test class to aid thorough tests for queue plugins.

Namespace

Drupal\Tests\purge\Kernel\Queue

Code

public function testCreateQueue() : void {
  $this->queue
    ->createItem([
    1,
    2,
    3,
  ]);
  $this->queue
    ->createQueue();
  $this
    ->assertEquals(1, $this->queue
    ->numberOfItems());
  $this->queue
    ->deleteQueue();
}