Skip to content
Snippets Groups Projects
Commit a85a667f authored by Eileen McNaughton's avatar Eileen McNaughton
Browse files

CRM-14355 test to check existing behaviour of alternate syntaxes

----------------------------------------
* CRM-14355: make api treat limit = 0 as an unlimited request
  http://issues.civicrm.org/jira/browse/CRM-14355
parent a387b3ef
Branches
Tags
No related merge requests found
......@@ -560,6 +560,23 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
$result = $this->callAPISuccess($entityName, 'get', $case[0]);
$this->assertEquals($case[1], $result['count'], $case[2]);
$this->assertEquals($case[1], count($result['values']));
//non preferred / legacy syntax
if(isset($case[0]['options']['limit'])) {
$result = $this->callAPISuccess($entityName, 'get', array('rowCount' => $case[0]['options']['limit']));
$this->assertEquals($case[1], $result['count'], $case[2]);
$this->assertEquals($case[1], count($result['values']));
//non preferred / legacy syntax
$result = $this->callAPISuccess($entityName, 'get', array('option_limit' => $case[0]['options']['limit']));
$this->assertEquals($case[1], $result['count'], $case[2]);
$this->assertEquals($case[1], count($result['values']));
//non preferred / legacy syntax
$result = $this->callAPISuccess($entityName, 'get', array('option.limit' => $case[0]['options']['limit']));
$this->assertEquals($case[1], $result['count'], $case[2]);
$this->assertEquals($case[1], count($result['values']));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment