From 36f8102e2f04c93149d2c64b5df87f071c32d767 Mon Sep 17 00:00:00 2001 From: 3onyc <3onyc@x3tech.com> Date: Thu, 31 May 2018 17:18:16 +0200 Subject: [PATCH] Skip null/empty values in SeeInOrder (#24395) * Skip null/empty values in SeeInOrder * Update SeeInOrder.php --- src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php b/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php index d3af81979a70..8c0cb189aacf 100644 --- a/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php +++ b/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php @@ -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) {