Fixed broken testArraySearch() test#5
Conversation
|
Good catch! This test was extracted from one of our internal tests, where Replacing every |
…oNumberComparison unit tests. Some tests would return a false positive when using assertEquals() because it uses loose comparison. (eg. assertEquals(0, 'true') === true)
…ner unit tests to be consistent with usage of assertSame() in other unit test classes.
…\RecursionInnerValue with explicit definition.
I replaced all usage of I also fixed a deprecation warning I was getting when running tests. |
Awesome, thank you! 😊 |
testArraySearch()test inStringToNumberComparisonTestclass did not assert correct behavior. It was asserting that the customarraySearch()function would return a value "equal" to0, which uses loose equality. Therefore, when running the test in PHP 8.0+ it falsely passes becausearraySearch()returnsfalse, which is "equal" to0. The test was updated to assert that the return value was exactly0.