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

Projects
None yet
2 participants
@3onyc
Contributor

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.6cli) 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.

3onyc and others added some commits May 31, 2018

@taylorotwell taylorotwell merged commit 36f8102 into laravel:5.6 May 31, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/styleci/pr The analysis has passed
Details

@GrahamCampbell GrahamCampbell changed the title from Skip null/empty values in SeeInOrder to [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