From 4202d7d3087db4f503a7586a1f3fc824ebf45b30 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Wed, 25 Jan 2012 21:46:20 -0800 Subject: Fixes #4081. Using ElggBatch to delete recursive. --- engine/tests/api/helpers.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/tests/api') diff --git a/engine/tests/api/helpers.php b/engine/tests/api/helpers.php index a615be0c0..62e4471e0 100644 --- a/engine/tests/api/helpers.php +++ b/engine/tests/api/helpers.php @@ -526,7 +526,7 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest { 'offset' => 0, 'limit' => 11 ); - $batch = new ElggBatch(array('ElggCoreHelpersTest', 'test_elgg_batch_callback'), $options, + $batch = new ElggBatch(array('ElggCoreHelpersTest', 'elgg_batch_callback_test'), $options, null, 5); $j = 0; foreach ($batch as $e) { @@ -539,12 +539,12 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest { $this->assertEqual(11, $j); // no increment, 0 start - ElggCoreHelpersTest::test_elgg_batch_callback(array(), true); + ElggCoreHelpersTest::elgg_batch_callback_test(array(), true); $options = array( 'offset' => 0, 'limit' => 11 ); - $batch = new ElggBatch(array('ElggCoreHelpersTest', 'test_elgg_batch_callback'), $options, + $batch = new ElggBatch(array('ElggCoreHelpersTest', 'elgg_batch_callback_test'), $options, null, 5); $batch->setIncrementOffset(false); @@ -558,12 +558,12 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest { $this->assertEqual(11, $j); // no increment, 3 start - ElggCoreHelpersTest::test_elgg_batch_callback(array(), true); + ElggCoreHelpersTest::elgg_batch_callback_test(array(), true); $options = array( 'offset' => 3, 'limit' => 11 ); - $batch = new ElggBatch(array('ElggCoreHelpersTest', 'test_elgg_batch_callback'), $options, + $batch = new ElggBatch(array('ElggCoreHelpersTest', 'elgg_batch_callback_test'), $options, null, 5); $batch->setIncrementOffset(false); @@ -578,7 +578,7 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest { $this->assertEqual(11, $j); } - static function test_elgg_batch_callback($options, $reset = false) { + static function elgg_batch_callback_test($options, $reset = false) { static $count = 1; if ($reset) { -- cgit v1.2.3