Skip to content
Snippets Groups Projects
Commit 31a4159f authored by Eileen McNaughton's avatar Eileen McNaughton
Browse files

Add unit test to hit class-loader issue

parent 1e956573
Branches
Tags
No related merge requests found
......@@ -9,6 +9,7 @@ use Civi\Api4\ContributionSoft;
use Civi\Api4\DedupeRule;
use Civi\Api4\DedupeRuleGroup;
use Civi\Api4\Email;
use Civi\Api4\Import;
use Civi\Api4\Note;
use Civi\Api4\OptionValue;
use Civi\Api4\UserJob;
......@@ -43,6 +44,7 @@ class CRM_Contribute_Import_Parser_ContributionTest extends CiviUnitTestCase {
DedupeRule::delete()
->addWhere('rule_table', '!=', 'civicrm_email')
->addWhere('dedupe_rule_group_id.name', '=', 'IndividualUnsupervised')->execute();
$this->callAPISuccess('Extension', 'disable', ['key' => 'civiimport']);
parent::tearDown();
}
......@@ -817,4 +819,14 @@ class CRM_Contribute_Import_Parser_ContributionTest extends CiviUnitTestCase {
]);
}
/**
* Test the Import api works from the extension when the extension is enabled after the import.
*/
public function testEnableExtension(): void {
$this->importContributionsDotCSV();
$this->callAPISuccess('Extension', 'enable', ['key' => 'civiimport']);
$result = Import::get($this->userJobID)->execute();
$this->assertEquals('ERROR', $result->first()['_status']);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment