function QueueSerializationTest::testQueueSerialization

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php \Drupal\KernelTests\Core\Queue\QueueSerializationTest::testQueueSerialization()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php \Drupal\KernelTests\Core\Queue\QueueSerializationTest::testQueueSerialization()
  3. 11.x core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php \Drupal\KernelTests\Core\Queue\QueueSerializationTest::testQueueSerialization()

Tests queue injection serialization.

File

core/tests/Drupal/KernelTests/Core/Queue/QueueSerializationTest.php, line 94

Class

QueueSerializationTest
Tests serializing a form with an injected DatabaseQueue instance.

Namespace

Drupal\KernelTests\Core\Queue

Code

public function testQueueSerialization() : void {
    $form_state = new FormState();
    $form_state->setRequestMethod('POST');
    $form_state->setCached();
    $form_builder = $this->container
        ->get('form_builder');
    $form_id = $form_builder->getFormId($this, $form_state);
    $form = $form_builder->retrieveForm($form_id, $form_state);
    $form_builder->prepareForm($form_id, $form, $form_state);
    $form_builder->processForm($form_id, $form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.