Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal: split assertContains for iterables and non-iterables #3422
currently, one can do both with a single assertion:
$this->assertContains('b', ['a', 'b', 'c']); $this->assertContains('b', 'abc');
which is confusing if someone use it like the following, and for that error prone due to accidental lack of types control
what about splitting the responsibility of that assertion, to have one for strings and one for iterables ?
Going further, we probably want to get rid of the optional parameters and introduce
added a commit
Nov 28, 2018
Hi ! First of all, glad you like the idea !
can you elaborate how you define difference of
I would rather promote strict comparison by default. Language itself is promoting to be strict about types now, let's not promote (by more convenient (/shorter) name) being not strict.
can you raise it as a PR? with link provided, I can't do the comments :(