Skip to content

Commit

Permalink
Merge pull request #23561 from eileenmcnaughton/import_catcher_
Browse files Browse the repository at this point in the history
Test fix
  • Loading branch information
monishdeb authored May 26, 2022
2 parents d6994c3 + 01926dc commit 9d505f8
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 9d505f8

Please sign in to comment.