Closed
Description
Reproduction case:
$this->assertContains('not in the list', new \ArrayObject([1]));
This generates the error:
Call to method PHPUnit\Framework\Assert::assertContains() with 'not in the list' and ArrayObject<int, int> will always evaluate to true.
This is obviously incorrect and appears to happen whenever $haystack
is a \Traversable
rather than an array.
Metadata
Metadata
Assignees
Labels
No labels