Skip to content

test: improve the tests for in_array#21087

Merged
Girgias merged 5 commits intophp:masterfrom
jorgsowa:test/improve-tests-for-in_array
Feb 23, 2026
Merged

test: improve the tests for in_array#21087
Girgias merged 5 commits intophp:masterfrom
jorgsowa:test/improve-tests-for-in_array

Conversation

@jorgsowa
Copy link
Contributor

Added more detailed descriptions to test iterations so it’s clear what the input is for each iteration. Additionally, I added a new test cases for an arrays containing references and enums.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

I'd rather split this test into multiple ones because trying to verify that 200 iterations of a foreach is corret is just unreasonable.

@jorgsowa jorgsowa force-pushed the test/improve-tests-for-in_array branch from a7dd7b0 to c64920f Compare January 30, 2026 16:26
@jorgsowa
Copy link
Contributor Author

Is splitting reference-value data into a separate test appropriate?

I added descriptions to each iteration to make the test results easier to review.
Additionally, I added an enum/object test cases, as it was missing before. I can

@jorgsowa jorgsowa force-pushed the test/improve-tests-for-in_array branch from 99b25bb to 0a40431 Compare February 7, 2026 00:08
@jorgsowa
Copy link
Contributor Author

jorgsowa commented Feb 7, 2026

Thanks for the review. I understand you now.

All feedback has been addressed: the large test was split into 9 files inside in_array/ subfolder with a shared .inc for the descriptive-key dictionary (renamed to $values), and enum test cases were added as well.

@jorgsowa jorgsowa force-pushed the test/improve-tests-for-in_array branch from 54dcc04 to 77d99c4 Compare February 7, 2026 00:52
@jorgsowa jorgsowa requested a review from Girgias February 19, 2026 16:44
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

Thanks, sorry for taking this long I was feeling somewhat unwell recently.

@Girgias Girgias merged commit b58087d into php:master Feb 23, 2026
10 checks passed
@jorgsowa
Copy link
Contributor Author

No problem, thank you!

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.

3 participants