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

IntrospectionProcessorTests: $expect and $actual are the same object by reference. #1895

Closed
healsdata opened this issue Jun 19, 2024 · 0 comments · Fixed by #1896
Closed
Labels
Milestone

Comments

@healsdata
Copy link
Contributor

Monolog version 2

Three tests in IntrospectionProcessorTest (testLevelTooLow, testLevelEqual, testLevelHigher) aren't actually testing anything. Because $expected = $input is a reference, the changes made to $expected['extra'] are made to $input and carried forward to $actual. You can demonstrate this by adding a return $record at the immediate start of InstrospectionProcessor::__invoke -- the tests still pass despite bypassing all the code.

I have a PR for this I'll open in a few minutes.

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

Successfully merging a pull request may close this issue.

2 participants