2 require_once 'CiviTest/CiviUnitTestCase.php';
5 * Class CRM_Utils_RestTest
7 class CRM_Utils_RestTest
extends CiviUnitTestCase
{
13 'name' => 'Rest Test',
14 'description' => 'Test Rest Interface Utilities',
15 'group' => 'CiviCRM BAO Tests',
23 function testProcessMultiple() {
24 $_SERVER['REQUEST_METHOD'] = 'POST';
30 'contact_type' => 'Individual',
31 'first_name' => 'Cow',
38 'contact_type' => 'Individual',
39 'first_name' => 'Sheep',
43 $_REQUEST['json'] = json_encode($input);
44 $output = CRM_Utils_REST
::processMultiple();
45 $this->assertGreaterThan(0, $output['cow']['id']);
46 $this->assertGreaterThan($output['cow']['id'], $output['sheep']['id']);