diff --git a/tests/phpunit/CiviTest/CiviCaseTestCase.php b/tests/phpunit/CiviTest/CiviCaseTestCase.php index e49789d59b11..4a7a9be65542 100644 --- a/tests/phpunit/CiviTest/CiviCaseTestCase.php +++ b/tests/phpunit/CiviTest/CiviCaseTestCase.php @@ -47,13 +47,14 @@ public function setUp() { 'Income and benefits stabilization' => 'Income and benefits stabilization', ); foreach ($optionValues as $name => $label) { - $activityTypes = $this->callAPISuccess('option_value', 'Create', array( - 'option_group_id' => 2, + $activityTypes = CRM_Core_BAO_OptionValue::ensureOptionValueExists([ + 'option_group_id' => 'activity_type', 'name' => $name, 'label' => $label, - 'component_id' => 7, - )); + 'component_id' => 'CiviCase', + ]); // store for cleanup + // @todo is this ever used? $this->optionValues[] = $activityTypes['id']; }