From 6e3e4e08647a7d5953765d237d3cec095cc2a32a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 12 Jun 2013 20:59:39 -0700 Subject: [PATCH] Fix testCreateBadTypeContact --- tests/phpunit/api/v3/ContactTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/api/v3/ContactTest.php b/tests/phpunit/api/v3/ContactTest.php index 120fb0c8d3..52ce00537d 100644 --- a/tests/phpunit/api/v3/ContactTest.php +++ b/tests/phpunit/api/v3/ContactTest.php @@ -171,9 +171,9 @@ class api_v3_ContactTest extends CiviUnitTestCase { 'contact_type' => 'Does not Exist', 'version' => $this->_apiversion, ); - $contact = civicrm_api('contact', 'create', $params); - $this->assertEquals($contact['is_error'], 1, "In line " . __LINE__); - $this->assertEquals('contact_type `Does not Exist` is not valid.', $contact['error_message']); + $result = civicrm_api('contact', 'create', $params); + $this->assertApiFailure($result); + $this->assertEquals("'Does not Exist' is not a valid option for field contact_type", $result['error_message']); } /** -- 2.25.1