Skip to content

Commit

Permalink
fix tests testing module install
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Mar 12, 2024
1 parent 00efc85 commit 40c49c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/Functional/InstallUninstallTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ public function testInstall(): void {
$edit['modules[factory_lollipop][enable]'] = 'factory_lollipop';
$this->drupalGet('admin/modules');
$this->submitForm($edit, 'Install');
$this->assertSession()->pageTextContains('Module Factory Lollipop has been enabled');

// Since Drupal 10.3 the installation message has been changed.
if (version_compare(\Drupal::VERSION, '10.3', '>=')) {
$this->assertSession()->pageTextContains('Module Factory Lollipop has been installed.');
}
else {
$this->assertSession()->pageTextContains('Module Factory Lollipop has been enabled');
}

// Makes sure the module has been installed.
$this->assertModules(['factory_lollipop'], TRUE);
Expand Down

0 comments on commit 40c49c7

Please sign in to comment.