Skip to content

Add missing assertion tests #29

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Conversation

W0rma
Copy link
Contributor

@W0rma W0rma commented Feb 20, 2025

This PR is built on top of #28 which enables PHP 8.3 + 8.4 in the CI which is necessary to be able to install PHPUnit 12.

Tests should become green as soon as Codeception/lib-asserts#14 is merged

@W0rma W0rma force-pushed the add-tests branch 2 times, most recently from f2726e6 to ba804f7 Compare March 11, 2025 06:00
@W0rma
Copy link
Contributor Author

W0rma commented Apr 2, 2025

@TavoNiievez @Naktibalda WDYT about this PR?

#28 should be merged beforehand.

@TavoNiievez
Copy link
Member

@W0rma Please make a rebase against master.

@W0rma
Copy link
Contributor Author

W0rma commented Apr 2, 2025

@W0rma Please make a rebase against master.

@TavoNiievez Done - thank you!

Copy link
Member

@TavoNiievez TavoNiievez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TavoNiievez TavoNiievez merged commit c58281f into Codeception:master Apr 24, 2025
4 checks passed
@W0rma W0rma deleted the add-tests branch April 24, 2025 18:05
@TavoNiievez
Copy link
Member

Could this be related to https://github.com/Codeception/Codeception/actions/runs/14649174925/job/41110601647?pr=6846 ?

There was 1 error:
1) AssertsTest: Php unit asserts
 Test  tests/unit/Codeception/Module/AssertsTest.php:testPHPUnitAsserts
                                                                                        
Error: ;1m  [Error] Call to undefined method PHPUnit\Framework\Assert::assertClassHasAttribute()  
                                                                                        
#1  /home/runner/work/Codeception/Codeception/app.php:45
#2  /home/runner/work/Codeception/Codeception/app.php:46
#3  /home/runner/work/Codeception/Codeception/codecept:7

ERRORS!
Tests: 13, Assertions: 40, Errors: 1.
Error: Process completed with exit code 1.

@W0rma
Copy link
Contributor Author

W0rma commented Apr 25, 2025

@TavoNiievez Thank you for the hint.

Yes, that's related to the change because before my PR the assertions were not tested.
But now the tests revealed that some assertions only work with the compatibility fixes added in codeception/lib-asserts v2.1 and v2.2.

Codeception/Codeception#6847 bumps the version of codeception/lib-asserts to 2.2 for Codeception.

#30 does the same for the codeception/module-asserts package.

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.

2 participants