function BatchTestController::testNoForm

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php \Drupal\batch_test\Controller\BatchTestController::testNoForm()
  2. 10 core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php \Drupal\batch_test\Controller\BatchTestController::testNoForm()
  3. 11.x core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php \Drupal\batch_test\Controller\BatchTestController::testNoForm()

Fires a batch process without a form submission.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse|null A redirect response if the batch is progressive. No return value otherwise.

1 string reference to 'BatchTestController::testNoForm'
batch_test.routing.yml in core/modules/system/tests/modules/batch_test/batch_test.routing.yml
core/modules/system/tests/modules/batch_test/batch_test.routing.yml

File

core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php, line 63

Class

BatchTestController
Controller routines for batch tests.

Namespace

Drupal\batch_test\Controller

Code

public function testNoForm() {
    batch_test_stack(NULL, TRUE);
    batch_set(_batch_test_batch_1());
    return batch_process('batch-test/redirect');
}

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