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

[6.x] Remove calls to TestCase::at #35474

Merged
merged 1 commit into from
Dec 4, 2020

Conversation

soilSpoon
Copy link
Contributor

@soilSpoon soilSpoon commented Dec 3, 2020

TestCase::at is deprecated as of PHPUnit 9
So I refactor the test.

❯ ./vendor/bin/phpunit --stop-on-warning
PHPUnit 9.4.4 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.13
Configuration: /Users/dh/Projects/framework/phpunit.xml.dist

.............................................................   61 / 5729 (  1%)
.............................................................  122 / 5729 (  2%)
.............................................................  183 / 5729 (  3%)
.............................................................  244 / 5729 (  4%)
.............................................................  305 / 5729 (  5%)
.............................................................  366 / 5729 (  6%)
.............................................................  427 / 5729 (  7%)
.........SSSSSSSSSSSS........................................  488 / 5729 (  8%)
...................................SSSSSS....................  549 / 5729 (  9%)
...................................S.S.......................  610 / 5729 ( 10%)
.............................................................  671 / 5729 ( 11%)
.............................................................  732 / 5729 ( 12%)
....................................................W

Time: 00:00.662, Memory: 140.50 MB

There was 1 warning:

1) Illuminate\Tests\Database\DatabaseConnectionTest::testBeginTransactionMethodRetriesOnFailure
The at() matcher has been deprecated. It will be removed in PHPUnit 10. Please refactor your test to not rely on the order in which methods are invoked.

Reference

sebastianbergmann/phpunit#4297

@driesvints
Copy link
Member

There's still one in the ValidationValidatorTest it seems. Can you patch that one as well? https://github.com/laravel/framework/pull/35474/checks?check_run_id=1493278872#step:8:96

@soilSpoon
Copy link
Contributor Author

@driesvints Oh my mistake, thank you for finding me

@soilSpoon soilSpoon force-pushed the featuer/phpunit branch 2 times, most recently from 23df538 to 34b0de4 Compare December 3, 2020 17:05
@soilSpoon soilSpoon changed the title [6.x] Remove calls to TestCase::at [6.x] Refactor PHPUnit deprecated methods Dec 3, 2020
@soilSpoon soilSpoon changed the title [6.x] Refactor PHPUnit deprecated methods [6.x] Remove calls to TestCase::at Dec 3, 2020
@driesvints
Copy link
Member

@soilSpoon thanks!

@soilSpoon soilSpoon force-pushed the featuer/phpunit branch 2 times, most recently from ee52288 to 69794cd Compare December 3, 2020 19:05
@soilSpoon soilSpoon closed this Dec 3, 2020
@soilSpoon soilSpoon deleted the featuer/phpunit branch December 3, 2020 19:37
@soilSpoon soilSpoon restored the featuer/phpunit branch December 3, 2020 19:40
@soilSpoon soilSpoon reopened this Dec 3, 2020
soilSpoon added a commit to soilSpoon/framework that referenced this pull request Dec 3, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge laravel#35474  after merging

## Reference
sebastianbergmann/phpunit#3687
soilSpoon added a commit to soilSpoon/framework that referenced this pull request Dec 3, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge laravel#35474  after merging

sebastianbergmann/phpunit#3687
soilSpoon added a commit to soilSpoon/framework that referenced this pull request Dec 3, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge laravel#35474  after merging

sebastianbergmann/phpunit#3687
soilSpoon added a commit to soilSpoon/framework that referenced this pull request Dec 4, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge laravel#35474  after merging

sebastianbergmann/phpunit#3687
soilSpoon added a commit to soilSpoon/framework that referenced this pull request Dec 4, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge laravel#35474  after merging

sebastianbergmann/phpunit#3687
taylorotwell pushed a commit that referenced this pull request Dec 4, 2020
`MockBuilder::setMethods` is soft deprecated as of PHPUnit 9
So I refactor the test.

Please merge #35474  after merging

sebastianbergmann/phpunit#3687
@taylorotwell taylorotwell merged commit 4822b4f into laravel:6.x Dec 4, 2020
@soilSpoon soilSpoon deleted the featuer/phpunit branch December 4, 2020 14:15
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.

4 participants