Skip to content

Commit

Permalink
Skip null/empty values in SeeInOrder (#24395)
Browse files Browse the repository at this point in the history
* Skip null/empty values in SeeInOrder

* Update SeeInOrder.php
  • Loading branch information
3onyc authored and taylorotwell committed May 31, 2018
1 parent 6d000a8 commit 36f8102
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php
Expand Up @@ -43,6 +43,10 @@ public function matches($values) : bool
$position = 0;

foreach ($values as $value) {
if (empty($value)) {
continue;
}

$valuePosition = mb_strpos($this->content, $value, $position);

if ($valuePosition === false || $valuePosition < $position) {
Expand Down

0 comments on commit 36f8102

Please sign in to comment.