Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change uninstall string check to boolean check #737

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

millnut
Copy link
Member

@millnut millnut commented Jul 1, 2024

This fixes the following error:

1) Drupal\Tests\localgov\Functional\LocalGovProfileTest::testLocalGovDrupalProfile
Failed asserting that 'The following reasons prevent the modules from being uninstalled: The 'LocalGov Drupal' install profile requires 'LocalGov Core'; The install profile 'LocalGov Drupal' is providing the following module(s): localgov_login_redirect' contains "module is required".

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
/var/www/html/web/profiles/contrib/localgov/tests/src/Functional/LocalGovProfileTest.php:36
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

Prior to Drupal 10.3 the assert check was checking the error message contains module is required, with Drupal 10.3 the error message does not contain this string and is much longer.

The following reasons prevent the modules from being uninstalled: The 'LocalGov Drupal' install profile requires 'LocalGov Core'; The install profile 'LocalGov Drupal' is providing the following module(s): localgov_login_redirect

This PR changes the check to use a boolean and just checking if an error message exists.

The failure in the workflow that paratest hides the true error message, is fixed in a previous PR #736

@millnut millnut changed the title fix: change uninstall check to boolean check fix: change uninstall string check to boolean check Jul 1, 2024
@ekes
Copy link
Member

ekes commented Jul 8, 2024

Just hit re-run all jobs as there was a paratest - ie no idea what - phpunit fail. I'm assuming we're not expecting a fail on this?

@millnut
Copy link
Member Author

millnut commented Jul 8, 2024

Yep paratest hides the actual failures, when running phpunit one failure is #738 which is still failing and the other failure is fixed in this PR #736

@finnlewis finnlewis merged commit a3a3732 into 3.x Jul 9, 2024
8 checks passed
@finnlewis finnlewis deleted the fix/3.x/fixed-failed-test branch July 9, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants