Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Skip null/empty values in SeeInOrder #24395

Merged
merged 2 commits into from
May 31, 2018

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