public function ServiceTest::testDelete in Purge 8.3
Tests \Drupal\purge\Plugin\Purge\Queue\QueueService::delete.
File
- tests/
src/ Kernel/ Queue/ ServiceTest.php, line 188
Class
Namespace
Drupal\Tests\purge\Kernel\QueueCode
public function testDelete() : void {
$this
->assertTrue(empty($this->service
->claim(10, 10)));
$this->service
->add($this->queuer, $this
->getInvalidations(3));
$claims = $this->service
->claim(3, 1);
$this->service
->delete([
array_pop($claims),
]);
sleep(4);
$claims = $this->service
->claim(3, 1);
$this
->assertTrue(2 === count($claims));
$this->service
->delete($claims);
sleep(4);
$this
->assertTrue(empty($this->service
->claim(10, 10)));
}