1 actions.test | ActionLoopTestCase::testActionLoop() |
Set up a loop with 3 - 12 recursions, and see if it aborts properly.
File
- core/
modules/ simpletest/ tests/ actions.test, line 20 - Tests for checking the actions system within Backdrop.
Class
- ActionLoopTestCase
- Test actions executing in a potential loop, and make sure they abort properly.
Code
function testActionLoop() {
// Delete any existing watchdog messages to clear the plethora of
// "Action added" messages from when Backdrop was installed.
db_delete('watchdog')->execute();
// To prevent this test from failing when xdebug is enabled, the maximum
// recursion level should be kept low enough to prevent the xdebug
// infinite recursion protection mechanism from aborting the request.
// See http://drupal.org/node/587634.
config_set('system.core', 'action_recursion_limit', 7);
$this->triggerActions();
}