t('Test value'), '#type' => 'textfield', ]; $form['submit'] = [ '#type' => 'submit', '#value' => t('Submit'), ]; return $form; } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { batch_test_stack('mock form submitted with value = ' . $form_state->getValue('test_value')); } }