feat(expect): fixes to contain with strings

This commit is contained in:
Nuno Maduro
2020-07-15 00:57:31 +02:00
parent e2deaae6c9
commit 2751bc9674
3 changed files with 10 additions and 5 deletions

View File

@ -147,7 +147,7 @@ final class Expectation
*/
public function toContain($value): Expectation
{
if (is_string($value)) {
if (is_string($this->value)) {
Assert::assertStringContainsString($value, $this->value);
} else {
Assert::assertContains($value, $this->value);