Skip to content

Commit

Permalink
Adjust for something new in 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
demeritcowboy committed Aug 19, 2024
1 parent 28f4801 commit bd37e00
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/src/FunctionalJavascript/ExistingContactElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,15 @@ public function testTokensInEmail() {
// Check if email was sent to contact 1.
$this->assertStringContainsString('[email protected]', $sent_email[0]['to']);

// Something new in 10.3
$weirdoExtraSpaces = version_compare(\Drupal::VERSION, '10.3.2', '>=') ? ' ' : '';
// And now there is no longer a newline
$weirdoNewline = version_compare(\Drupal::VERSION, '10.3.2', '<') ? "\n" : '';

// Verify tokens are rendered correctly.
$this->assertEquals("Submitted Values Are -
-------- Contact 1
-------- Contact 1 {$weirdoNewline}
-----------------------------------------------------------
*Existing Contact*
Expand All @@ -402,9 +407,9 @@ public function testTokensInEmail() {
New Jersey
*Email*
[email protected] [1]
Existing Contact - Frederick Pabst. Activity 1 ID - {$actID1}. Activity 2 ID - {$actID2}.
Webform CiviCRM Contacts IDs - {$this->rootUserCid}. Webform CiviCRM Contacts Links -
{$cidURL} Country - United
Existing Contact - Frederick Pabst. Activity 1 ID - {$actID1}. Activity 2 ID - {$actID2}.{$weirdoExtraSpaces}
Webform CiviCRM Contacts IDs - {$this->rootUserCid}. Webform CiviCRM Contacts Links -{$weirdoExtraSpaces}
{$cidURL} Country - United{$weirdoExtraSpaces}
States. State/Province - New Jersey.
[1] mailto:[email protected]
Expand Down

0 comments on commit bd37e00

Please sign in to comment.