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

Fake all models #11

Open
hamidatjajiga opened this issue Sep 28, 2022 · 2 comments
Open

Fake all models #11

hamidatjajiga opened this issue Sep 28, 2022 · 2 comments

Comments

@hamidatjajiga
Copy link

Consider a situation that you are testing a complicated method which a couple of models are involved. Is there any way to fake all models with one single command?
e.g.

EloquentMockery::fakeAll();
@milwad-dev
Copy link
Contributor

milwad-dev commented Jan 7, 2023

Like this!

EloquentMockery::fakeModels([Category::class, User::class, Product::class]);

@milwad-dev
Copy link
Contributor

Created!

    FakeDB::mockEloquentBuilder();

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

2 participants