Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 13, 2025

Description

The assertArrayHasKey() and assertArrayNotHasKey() method can be used instead of "manually" doing an array_key_exists() with assert[True|False]().

These methods were already available in PHPUnit 4.x and are already in use in other places in the test suite, so there is no reason not to use them in these tests too.

Suggested changelog entry

N/A

The `assertArrayHasKey()` and `assertArrayNotHasKey()` method can be used instead of "manually" doing an `array_key_exists()` with `assert[True|False]()`.

These methods were already available in PHPUnit 4.x and are already in use in other places in the test suite, so there is no reason not to use them in these tests too.
@jrfnl jrfnl added this to the 3.12.0 milestone Mar 13, 2025
@jrfnl jrfnl enabled auto-merge March 13, 2025 04:38
@jrfnl jrfnl merged commit eefe4e0 into master Mar 13, 2025
61 checks passed
@jrfnl jrfnl deleted the feature/tests-use-more-appropriate-assertions branch March 13, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant