Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed May 24, 2022
1 parent ca13ec4 commit 01926dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function tearDown(): void {
* @throws \API_Exception
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
* @throws \Civi\API\Exception\UnauthorizedException
*/
public function testImportParserWithEmployeeOfRelationship(): void {
$this->organizationCreate([
Expand All @@ -70,15 +69,15 @@ public function testImportParserWithEmployeeOfRelationship(): void {
$values = array_values($contactImportValues);
$userJobID = $this->getUserJobID([
'mapper' => [['first_name'], ['last_name'], ['5_a_b', 'organization_name']],
'onDuplicate' => CRM_Import_Parser::DUPLICATE_UPDATE,
]);

$parser = new CRM_Contact_Import_Parser_Contact($fields);
$parser->setUserJobID($userJobID);
$parser->_onDuplicate = CRM_Import_Parser::DUPLICATE_UPDATE;
$parser->init();

$this->assertEquals(CRM_Import_Parser::VALID, $parser->import(CRM_Import_Parser::DUPLICATE_UPDATE, $values), 'Return code from parser import was not as expected');
$this->callAPISuccess('Contact', 'get', [
$this->callAPISuccessGetSingle('Contact', [
'first_name' => 'Alok',
'last_name' => 'Patel',
'organization_name' => 'Agileware',
Expand Down

0 comments on commit 01926dc

Please sign in to comment.