function test_batch_test_install
Same name in other branches
- 8.9.x core/modules/system/tests/modules/test_batch_test/test_batch_test.install \test_batch_test_install()
- 10 core/modules/system/tests/modules/test_batch_test/test_batch_test.install \test_batch_test_install()
- 11.x core/modules/system/tests/modules/test_batch_test/test_batch_test.install \test_batch_test_install()
Implements hook_install().
File
-
core/
modules/ system/ tests/ modules/ test_batch_test/ test_batch_test.install, line 13
Code
function test_batch_test_install() {
$total = 2;
$operations = [];
for ($i = 1; $i <= $total; $i++) {
$operations[] = [
'_test_batch_test_callback',
[
$i,
],
];
}
$batch = [
'operations' => $operations,
];
batch_set($batch);
$batch =& batch_get();
$batch['progressive'] = FALSE;
batch_process();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.