Skip to content

Commit

Permalink
dev/core#4231 Add test to demonstrate failure to import non-default s…
Browse files Browse the repository at this point in the history
…tate
  • Loading branch information
eileenmcnaughton committed Jun 19, 2024
1 parent 926069b commit ffaecc4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
First Name,Last Name,State,Country
Bob,Smith,Alberta,Canada
15 changes: 15 additions & 0 deletions tests/phpunit/CRM/Contact/Import/Parser/ContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,21 @@ public function testImportMasterAddress(): void {
}

/**
* @throws \CRM_Core_Exception
*/
public function testImportNonDefaultCountryState(): void {
\Civi::settings()->set('defaultContactCountry', 1228);
$this->validateCSV('individual_country_state.csv', [
['first_name'],
['last_name'],
['state_province', 'Primary'],
['country', 'Primary'],
]);
$dataSource = $this->getDataSource();
$row = $dataSource->getRow();
}

/**
* Test updating an existing contact with external_identifier match but
* subtype mismatch.
*
Expand Down

0 comments on commit ffaecc4

Please sign in to comment.