simpletest_test.install in Zircon Profile 8
Same filename and directory in other branches
File
core/modules/simpletest/tests/modules/simpletest_test/simpletest_test.installView source
<?php
/**
* Implements hook_install().
*/
function simpletest_test_install() {
$total = 2;
$operations = array();
for ($i = 1; $i <= $total; $i++) {
$operations[] = array(
'_simpletest_test_callback',
array(
$i,
),
);
}
$batch = array(
'operations' => $operations,
);
batch_set($batch);
$batch =& batch_get();
$batch['progressive'] = FALSE;
batch_process();
}
/**
* Callback for batch operations.
*/
function _simpletest_test_callback($id) {
$entity = entity_create('entity_test', array(
'id' => $id,
));
$entity
->save();
}
Functions
Name | Description |
---|---|
simpletest_test_install | Implements hook_install(). |
_simpletest_test_callback | Callback for batch operations. |