public function QueueTest::testQueueDeletion in Advanced Queue 8
Tests deleting a queue.
File
- tests/
src/ Functional/ QueueTest.php, line 120
Class
- QueueTest
- Tests the queue UI.
Namespace
Drupal\Tests\advancedqueue\FunctionalCode
public function testQueueDeletion() {
$queue = Queue::create([
'id' => 'test',
'label' => 'Test',
'backend' => 'database',
'processor' => QueueInterface::PROCESSOR_DAEMON,
'processing_time' => 100,
]);
$queue
->save();
$this
->drupalGet('admin/config/system/queues/manage/' . $queue
->id() . '/delete');
$this
->submitForm([], 'Delete');
$this
->assertSession()
->addressEquals('admin/config/system/queues');
$queue_exists = (bool) Queue::load('test');
$this
->assertEmpty($queue_exists, 'The queue has been deleted from the database.');
}