From 8092b5c2a953e9ecd9aca9ac2782dacb40b28019 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 16 Oct 2016 12:44:04 +1100 Subject: [PATCH] CRM-19463 Get E2E tests working on php7 --- CRM/Utils/SoapServer.php | 2 +- tests/phpunit/E2E/Extern/SoapTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/SoapServer.php b/CRM/Utils/SoapServer.php index 5d92a21091..0aaa56e677 100644 --- a/CRM/Utils/SoapServer.php +++ b/CRM/Utils/SoapServer.php @@ -330,7 +330,7 @@ class CRM_Utils_SoapServer { public function get_contact($key, $params) { $this->verify($key); $params['version'] = 3; - return civicrm_api('contact', 'get', $params); + return json_encode(civicrm_api('contact', 'get', $params)); } } diff --git a/tests/phpunit/E2E/Extern/SoapTest.php b/tests/phpunit/E2E/Extern/SoapTest.php index 3abc49e88f..e98a39653d 100644 --- a/tests/phpunit/E2E/Extern/SoapTest.php +++ b/tests/phpunit/E2E/Extern/SoapTest.php @@ -77,10 +77,10 @@ class E2E_Extern_SoapTest extends CiviEndToEndTestCase { public function testGetContact() { $client = $this->createClient(); $key = $client->authenticate($this->adminUser, $this->adminPass); - $contacts = $client->get_contact($key, array( + $contacts = json_decode($client->get_contact($key, array( 'contact_id' => 101, 'return.display_name' => 1, - )); + )), TRUE); $this->assertEquals($contacts['is_error'], 0); $this->assertEquals($contacts['count'], 1); $this->assertEquals($contacts['values'][101]['contact_id'], 101); -- 2.25.1