2 require_once 'CiviTest/CiviUnitTestCase.php';
3 class CRM_Utils_RestTest
extends CiviUnitTestCase
{
7 'description' => 'Test Rest Interface Utilities',
8 'group' => 'CiviCRM BAO Tests',
16 function testProcessMultiple() {
17 $_SERVER['REQUEST_METHOD'] = 'POST';
23 'contact_type' => 'Individual',
24 'first_name' => 'Cow',
31 'contact_type' => 'Individual',
32 'first_name' => 'Sheep',
36 $_REQUEST['json'] = json_encode($input);
37 $output = CRM_Utils_REST
::processMultiple();
38 $this->assertGreaterThan(0, $output['cow']['id']);
39 $this->assertGreaterThan($output['cow']['id'], $output['sheep']['id']);