Skip to content

Commit

Permalink
CRM-38: Fix Failing Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MiyaNoctem committed Apr 17, 2018
1 parent f6824d0 commit 487c45e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Civi/Test/Api3TestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function callAPISuccess($entity, $action, $params, $checkAgainst = NULL)
* @param string $entity
* @param array $params
* @param null $count
* @throws Exception
* @throws \Exception
* @return array|int
*/
public function callAPISuccessGetCount($entity, $params, $count = NULL) {
Expand All @@ -170,7 +170,7 @@ public function callAPISuccessGetCount($entity, $params, $count = NULL) {
);
$result = $this->civicrm_api($entity, 'getcount', $params);
if (!is_int($result) || !empty($result['is_error']) || isset($result['values'])) {
throw new Exception('Invalid getcount result : ' . print_r($result, TRUE) . " type :" . gettype($result));
throw new \Exception('Invalid getcount result : ' . print_r($result, TRUE) . " type :" . gettype($result));
}
if (is_int($count)) {
$this->assertEquals($count, $result, "incorrect count returned from $entity getcount");
Expand All @@ -193,7 +193,7 @@ public function callAPISuccessGetCount($entity, $params, $count = NULL) {
* - array
* - object
*
* @throws Exception
* @throws \Exception
* @return array|int
*/
public function callAPISuccessGetSingle($entity, $params, $checkAgainst = NULL) {
Expand All @@ -202,7 +202,7 @@ public function callAPISuccessGetSingle($entity, $params, $checkAgainst = NULL)
);
$result = $this->civicrm_api($entity, 'getsingle', $params);
if (!is_array($result) || !empty($result['is_error']) || isset($result['values'])) {
throw new Exception('Invalid getsingle result' . print_r($result, TRUE));
throw new \Exception('Invalid getsingle result' . print_r($result, TRUE));
}
if ($checkAgainst) {
// @todo - have gone with the fn that unsets id? should we check id?
Expand Down

0 comments on commit 487c45e

Please sign in to comment.