File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 8
8
use Illuminate \Support \Facades \Schema ;
9
9
use Laravel \Passport \Client ;
10
10
use Laravel \Passport \ClientRepository ;
11
+ use Laravel \Passport \Database \Factories \ClientFactory ;
11
12
use Laravel \Passport \HasApiTokens ;
12
13
use Laravel \Passport \Token ;
13
14
use Laravel \Passport \TokenRepository ;
@@ -51,7 +52,7 @@ public function testGettingAccessTokenWithPasswordGrant()
51
52
$ user ->save ();
52
53
53
54
/** @var Client $client */
54
- $ client = Client:: factory ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
55
+ $ client = ClientFactory:: new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
55
56
56
57
$ response = $ this ->post (
57
58
'/oauth/token ' ,
@@ -102,7 +103,7 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidPassword()
102
103
$ user ->save ();
103
104
104
105
/** @var Client $client */
105
- $ client = Client:: factory ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
106
+ $ client = ClientFactory:: new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
106
107
107
108
$ response = $ this ->post (
108
109
'/oauth/token ' ,
@@ -145,7 +146,7 @@ public function testGettingAccessTokenWithPasswordGrantWithInvalidClientSecret()
145
146
$ user ->save ();
146
147
147
148
/** @var Client $client */
148
- $ client = Client:: factory ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
149
+ $ client = ClientFactory:: new ()->asPasswordClient ()->create (['user_id ' => $ user ->id ]);
149
150
150
151
$ response = $ this ->post (
151
152
'/oauth/token ' ,
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ protected function setUp(): void
20
20
{
21
21
parent ::setUp ();
22
22
23
- $ this ->withFactories (__DIR__ .'/../../database/factories ' );
24
-
25
23
$ this ->artisan ('migrate:fresh ' );
26
24
27
25
Passport::routes ();
You can’t perform that action at this time.
0 commit comments