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;
DedupeRule::delete()
->addWhere('rule_table', '!=', 'civicrm_email')
->addWhere('dedupe_rule_group_id.name', '=', 'IndividualUnsupervised')->execute();
+ $this->callAPISuccess('Extension', 'disable', ['key' => 'civiimport']);
parent::tearDown();
}
]);
}
+ /**
+ * 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']);
+ }
+
}