Merge pull request #18838 from eileenmcnaughton/vrenew
[civicrm-core.git] / tests / phpunit / CRM / Contribute / Form / ContributionTest.php
index 82cb73ce9dfc85d86e3c082b9c307ffe95230d08..37ba9509563cc6f58e0c826bd0550795a7921edd 100644 (file)
@@ -817,7 +817,9 @@ Price Field - Price Field 1        1   $ 100.00      $ 100.00
    * @throws \CiviCRM_API3_Exception
    * @throws \Civi\Payment\Exception\PaymentProcessorException
    */
-  public function testSubmitWithPCP() {
+  public function testSubmitWithPCP(): void {
+    $mut = new CiviMailUtils($this, TRUE);
+    $mut->clearMessages();
     $params = $this->pcpParams();
     $pcpID = $this->createPCPBlock($params);
     $form = new CRM_Contribute_Form_Contribution();
@@ -834,6 +836,7 @@ Price Field - Price Field 1        1   $ 100.00      $ 100.00
     ], CRM_Core_Action::ADD);
     $softCredit = $this->callAPISuccessGetSingle('ContributionSoft', []);
     $this->assertEquals('Dobby', $softCredit['pcp_roll_nickname']);
+    $mut->checkMailLog(['Personal Campaign Page Owner Notification']);
   }
 
   /**
@@ -1773,7 +1776,7 @@ Price Field - Price Field 1        1   $ 100.00      $ 100.00
 
     // The page contents load later by ajax, so there's just the surrounding
     // html available now, but we can check at least one thing while we're here.
-    $this->assertStringContainsString("selectedTab = 'widget';", $contents);
+    $this->assertContains("mainTabContainer", $contents);
   }
 
 }