setRebuild(); } /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->installSchema('system', ['key_value_expire', 'sequences']); $this->installEntitySchema('user'); $this->queue = \Drupal::service('queue.database')->get('aggregator_refresh'); $test_user = User::create([ 'name' => 'foobar', 'mail' => 'foobar@example.com', ]); $test_user->save(); \Drupal::service('current_user')->setAccount($test_user); } /** * Tests queue injection serialization. */ 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); } }