Skip to content

Conversation

3onyc
Copy link
Contributor

@3onyc 3onyc commented May 31, 2018

Currently passing empty strings to SeeInOrder emits a warning from mb_strpos():

PHP Warning:  mb_strpos(): Empty delimiter in vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php on line 46

As demonstrated in php artisan tinker:

Psy Shell v0.9.4 (PHP 7.2.6 — cli) by Justin Hileman
>>> use Illuminate\Foundation\Testing\Constraints\SeeInOrder;
>>> $const = new SeeInOrder('test');
=> Illuminate\Foundation\Testing\Constraints\SeeInOrder {#2448}
>>> $const->matches(['']);
PHP Warning:  mb_strpos(): Empty delimiter in vendor/laravel/framework/src/Illuminate/Foundation/Testing/Constraints/SeeInOrder.php on line 46

We're currently using assertSeeInOrder to verify pages show model values in a form, but it currently fails on null/empty properties as mentioned above.

@taylorotwell taylorotwell merged commit 36f8102 into laravel:5.6 May 31, 2018
@GrahamCampbell GrahamCampbell changed the title Skip null/empty values in SeeInOrder [5.6] Skip null/empty values in SeeInOrder May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants