Skip to content

Support for full PHPUnit public API #5

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 6 commits into from Aug 28, 2020
Merged

Support for full PHPUnit public API #5

merged 6 commits into from Aug 28, 2020

Conversation

ghost
Copy link

@ghost ghost commented Aug 14, 2020

  • Support for full PHPUnit public API.
  • Separate methods inherited exactly from the PHPUnit library to an individual trait for clarity and maintainability.
  • Added documentation via PHP annotations.

Separate methods inherited from the PHPUnit library to an individual trait for clarity and maintainability
added documentation via PHP annotations
@Naktibalda
Copy link
Member

It is difficult to see what methods were added, because you refactored in the same commit.
Could you provide a list of methods that were added?

@ghost
Copy link
Author

ghost commented Aug 14, 2020

Done! 😃 You can see the changes here.

All were added assertions.
The only two assertions that I took the liberty of removing were:

assertArraySubset
assertInternalType

Because they were deprecated and eliminated.

@Naktibalda I'll be very aware of your comments. Cheers!


protected function assertStringContainsString($needle, $haystack, $message = '')
{
TestCase::assertStringContainsString($needle, $haystack, $message);
Copy link
Member

Choose a reason for hiding this comment

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

Right, you removed my wrapper methods here, so they are broken with older versions of PHPUnit.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, It wasn't my intention, but I'm glad it could be fixed, thanks you

@brainformatik
Copy link

Done! You can see the changes here.

All were added assertions.
The only two assertions that I took the liberty of removing were:

assertArraySubset
assertInternalType

Because they were deprecated and eliminated.

@Naktibalda I'll be very aware of your comments. Cheers!

Info: we use Codeception 4.0.x with PHPUnit 7.5.x, because of dependency in codeception ^1.0 of this package and the removal of the two mentioned assertions, pipeline fails now.

Because we don't have the time to upgrade to PHPUnit at the moment I think we have to pin to version 1.12.x now.

@Naktibalda
Copy link
Member

@brainformatik that issue was fixed in lib-asserts 1.13.1, you can upgrade it now.

@brainformatik
Copy link

@Naktibalda thanks for quick response, I saw the updated version, but error persists:

PHP Fatal error: The modifiers of the trait method assertInternalType() are changed, but this method does not exist. Error in ...codeception/module-asserts/src/Codeception/Module/Asserts.php on line 11

Error comes from module-asserts which we use.

@Naktibalda
Copy link
Member

I released 1.3.0 of module-asserts too.

@brainformatik
Copy link

brainformatik commented Aug 28, 2020

Thanks, with that it's working again.

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.

3 participants