function _batch_test_theme_callback
Same name in other branches
- 7.x modules/simpletest/tests/batch_test.module \_batch_test_theme_callback()
- 9 core/modules/system/tests/modules/batch_test/batch_test.module \_batch_test_theme_callback()
- 10 core/modules/system/tests/modules/batch_test/batch_test.module \_batch_test_theme_callback()
- 11.x core/modules/system/tests/modules/batch_test/batch_test.module \_batch_test_theme_callback()
Implements callback_batch_operation().
Tests the progress page theme.
1 string reference to '_batch_test_theme_callback'
- BatchTestController::testThemeBatch in core/
modules/ system/ tests/ modules/ batch_test/ src/ Controller/ BatchTestController.php - Runs a batch for testing theme used on the progress page.
File
-
core/
modules/ system/ tests/ modules/ batch_test/ batch_test.module, line 221
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.
$theme = \Drupal::theme()->getActiveTheme()
->getName();
batch_test_stack($theme);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.