diff --git a/tests/src/FunctionalJavascript/WebformCivicrmTestBase.php b/tests/src/FunctionalJavascript/WebformCivicrmTestBase.php index 518bb38e7..0a9c855aa 100644 --- a/tests/src/FunctionalJavascript/WebformCivicrmTestBase.php +++ b/tests/src/FunctionalJavascript/WebformCivicrmTestBase.php @@ -98,13 +98,7 @@ protected function setUp(): void { 'id' => 'civicrm_webform_test', 'title' => 'CiviCRM Webform Test.' . $CiviCRM_version, ]); - $this->rootUserCid = $this->createIndividual()['id']; - // Create CiviCRM contact for rootUser. - $this->utils->wf_civicrm_api('UFMatch', 'create', [ - 'uf_id' => $this->rootUser->id(), - 'uf_name' => $this->rootUser->getAccountName(), - 'contact_id' => $this->rootUserCid, - ]); + $this->rootUserCid = $this->getUFMatchRecord($this->rootUser->id())['contact_id']; } protected function tearDown(): void {