From 4038f8ec993a30cce083f6a365ebbea1af596ef5 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 18 Mar 2014 18:03:15 -0700 Subject: [PATCH] CRM-14355 - SyntaxConformanceTest::testLimit - Cleanup all 30 test records --- tests/phpunit/api/v3/SyntaxConformanceTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index f34473d0e5..596f48b6a0 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -549,8 +549,10 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { } // make 30 test items -- 30 > 25 (the default limit) + $ids = array(); for ($i = 0; $i < 30; $i++) { $baoObj = CRM_Core_DAO::createTestObject($baoString, array('currency' => 'USD')); + $ids[] = $baoObj->id; } // each case is array(0 => $inputtedApiOptions, 1 => $expectedResultCount) @@ -564,7 +566,9 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { $this->checkLimitAgainstExpected($entityName, array('option.limit' => $case[0]['options']['limit']), $case[1], $case[2]); } } - $baoObj->deleteTestObjects($baoString); + foreach ($ids as $id) { + CRM_Core_DAO::deleteTestObjects($baoString, array('id' => $id)); + } $baoObj->free(); } -- 2.25.1