3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * Class api_v3_SurveyRespondantTest
16 class api_v3_SurveyRespondantTest
extends CiviUnitTestCase
{
17 protected $_apiversion = 3;
20 public function setUp() {
22 $this->useTransaction(TRUE);
23 $phoneBankActivity = $this->callAPISuccess('Option_value', 'Get', ['label' => 'PhoneBank', 'sequential' => 1]);
24 $phoneBankActivityTypeID = $phoneBankActivity['values'][0]['value'];
26 'title' => "survey respondent",
27 'activity_type_id' => $phoneBankActivityTypeID,
28 'instructions' => "Call people, ask for money",
30 $survey = $this->callAPISuccess('survey', 'create', $surveyParams);
31 $surveyID = $survey['id'];
34 'survey_id' => $surveyID,
39 * Test survey respondent get.
41 public function testGetSurveyRespondants() {
42 $result = $this->callAPIAndDocument("SurveyRespondant", "get", $this->params
, __FUNCTION__
, __FILE__
);