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

[10.x] ClientFactory Error #1347

Closed
wants to merge 2 commits into from
Closed

Conversation

victorbuild
Copy link

@victorbuild victorbuild commented Sep 12, 2020

UnitTest create Client use ClientFactory Error

 Passport::actingAsClient(
        Client::factory()->create()
    ); 

@victorbuild
Copy link
Author

no modify ClientFactory namespace copy to poject

php artisan vendor:publish --tag=passport-factories

Error
image

I don’t know how to modify it, but modifying the namespace of the ClientFactory file in the project can be executed correctly

@taylorotwell
Copy link
Member

@driesvints I think we need to use a separate client factory for our own tests and then have a stub factory with the proper namespace. I have also added a new method to the "HasFactory" trait to allow the model to define what factory it uses (newFactory method):

image

@driesvints driesvints changed the title ClientFactory Error [10.x] ClientFactory Error Sep 14, 2020
@taylorotwell
Copy link
Member

We will fix this with a different approach.

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