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.5] Fix connection resolver and static side effect #22178

Merged
merged 2 commits into from
Nov 23, 2017

Conversation

hastinbe
Copy link

@hastinbe hastinbe commented Nov 22, 2017

The following tests fail on a fresh clone of 5.5 when you run phpunit --filter DatabaseEloquentModelTest

1) Illuminate\Tests\Database\DatabaseEloquentModelTest::testCreateMethodSavesNewModel
Error: Call to a member function connection() on null

2) Illuminate\Tests\Database\DatabaseEloquentModelTest::testMakeMethodDoesNotSaveNewModel
Error: Call to a member function connection() on null

3) Illuminate\Tests\Database\DatabaseEloquentModelTest::testForceCreateMethodSavesNewModelWithGuardedAttributes
Error: Call to a member function connection() on null

4) Illuminate\Tests\Database\DatabaseEloquentModelTest::testWithoutMethodRemovesEagerLoadedRelationshipCorrectly
Error: Call to a member function connection() on null

5) Illuminate\Tests\Database\DatabaseEloquentModelTest::testEagerLoadingWithColumns
Error: Call to a member function connection() on null

There's static state from a previous test that is affecting other tests.

Beau Hastings added 2 commits November 22, 2017 17:05
Fixes laravel#22133

Signed-off-by: Beau Hastings <beausy@gmail.com>
@taylorotwell taylorotwell merged commit 3cfb9b9 into laravel:5.5 Nov 23, 2017
@hastinbe hastinbe deleted the fix-eloquentmodel-tests branch November 23, 2017 14:15
@hastinbe hastinbe restored the fix-eloquentmodel-tests branch November 23, 2017 14:15
@hastinbe hastinbe deleted the fix-eloquentmodel-tests branch November 23, 2017 14:15
@GrahamCampbell GrahamCampbell changed the title Fix connection resolver and static side effect [5.5] Fix connection resolver and static side effect Nov 26, 2017
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