You are here

function _batch_test_theme_callback in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/batch_test/batch_test.module \_batch_test_theme_callback()
  2. 9 core/modules/system/tests/modules/batch_test/batch_test.module \_batch_test_theme_callback()

Batch callback function for testing the theme used on the progress page.

1 string reference to '_batch_test_theme_callback'
batch_test_theme_batch in modules/simpletest/tests/batch_test.module
Menu callback: run a batch for testing theme used on the progress page.

File

modules/simpletest/tests/batch_test.module, line 490
Helper module for the Batch API tests.

Code

function _batch_test_theme_callback() {

  // Because drupalGet() steps through the full progressive batch before
  // returning control to the test function, we cannot test that the correct
  // theme is being used on the batch processing page by viewing that page
  // directly. Instead, we save the theme being used in a variable here, so
  // that it can be loaded and inspected in the thread running the test.
  global $theme;
  batch_test_stack($theme);
}