You are here

public function QueueSerializationTest::testQueueSerialization in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Queue/QueueSerializationTest.php \Drupal\system\Tests\Queue\QueueSerializationTest::testQueueSerialization()

Tests queue injection serialization.

File

core/modules/system/src/Tests/Queue/QueueSerializationTest.php, line 98
Contains \Drupal\system\Tests\Queue\QueueSerializationTest.

Class

QueueSerializationTest
Tests serializing a form with an injected DatabaseQueue instance.

Namespace

Drupal\system\Tests\Queue

Code

public function testQueueSerialization() {
  $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);
}