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

DatabaseEloquentModelTests failing #22133

Closed
hastinbe opened this issue Nov 19, 2017 · 3 comments
Closed

DatabaseEloquentModelTests failing #22133

hastinbe opened this issue Nov 19, 2017 · 3 comments

Comments

@hastinbe
Copy link

hastinbe commented Nov 19, 2017

  • Laravel Version: 5.5.21
  • PHP Version: 7.0.22

Description:

The following tests fail on a fresh clone of 5.5:

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

Steps To Reproduce:

Clone the repo. Install dependencies. phpunit --filter DatabaseEloquentModelTest

Other

Want to make sure I'm not the only one. I fixed the errors with hastinbe/framework@d6c7673

@Dylan-DPC-zz
Copy link

You can verify this by looking at CI results on any 5.5 PR

hastinbe pushed a commit to hastinbe/framework that referenced this issue Nov 22, 2017
Fixes laravel#22133

Signed-off-by: Beau Hastings <beausy@gmail.com>
@hastinbe
Copy link
Author

@themsaid you closed my issue, but didn't bother to reproduce it. There's static state from a previous test that is affecting other tests. I've updated my commit to fix them.

@themsaid
Copy link
Member

Thanks for the PR, I've closed since as Dylan said Travis is not failing and thus the overall tests are running successfully, in that case opening a PR would be a great chance for us to identify the issue and discuss a change that might prevent it.

taylorotwell pushed a commit that referenced this issue Nov 23, 2017
* Fix connection resolver and static side effect

Fixes #22133

Signed-off-by: Beau Hastings <beausy@gmail.com>

* Formatting
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

No branches or pull requests

3 participants