mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1895] IntrospectionProcessorTests: $expect and $actual are the same object by reference. #812
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#812
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @healsdata on GitHub (Jun 19, 2024).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1895
Monolog version 2
Three tests in IntrospectionProcessorTest (testLevelTooLow, testLevelEqual, testLevelHigher) aren't actually testing anything. Because
$expected = $inputis a reference, the changes made to$expected['extra']are made to $input and carried forward to $actual. You can demonstrate this by adding areturn $recordat the immediate start ofInstrospectionProcessor::__invoke-- the tests still pass despite bypassing all the code.I have a PR for this I'll open in a few minutes.