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

Handle new assertions introduced in PHPUnit 11.5.0 #214

Closed
jrfnl opened this issue Dec 6, 2024 · 0 comments · Fixed by #225
Closed

Handle new assertions introduced in PHPUnit 11.5.0 #214

jrfnl opened this issue Dec 6, 2024 · 0 comments · Fixed by #225

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented Dec 6, 2024

PHPUnit 11.5.0 has just been released and introduced a large range of new assertions.

  • Method assertContainsNotOnlyInstancesOf() in the PHPUnit\Framework\Assert class as the inverse of the assertContainsOnlyInstancesOf() method
  • Methods assertContainsOnlyArray(), assertContainsOnlyBool(), assertContainsOnlyCallable(), assertContainsOnlyFloat(), assertContainsOnlyInt(), assertContainsOnlyIterable(), assertContainsOnlyNull(), assertContainsOnlyNumeric(), assertContainsOnlyObject(), assertContainsOnlyResource(), assertContainsOnlyClosedResource(), assertContainsOnlyScalar(), and assertContainsOnlyString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic assertContainsOnly() method
  • Methods assertContainsNotOnlyArray(), assertContainsNotOnlyBool(), assertContainsNotOnlyCallable(), assertContainsNotOnlyFloat(), assertContainsNotOnlyInt(), assertContainsNotOnlyIterable(), assertContainsNotOnlyNull(), assertContainsNotOnlyNumeric(), assertContainsNotOnlyObject(), assertContainsNotOnlyResource(), assertContainsNotOnlyClosedResource(), assertContainsNotOnlyScalar(), and assertContainsNotOnlyString() in the PHPUnit\Framework\Assert class as specialized alternatives for the generic assertNotContainsOnly() method

The PHPUnit Polyfills 3.x series will need polyfills for these.

Ref: https://github.com/sebastianbergmann/phpunit/releases/tag/11.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant