@@ -29,8 +29,8 @@ protected function tearDown(): void
2929 public function test_request_is_passed_along_if_claim_is_present_on_token ()
3030 {
3131 /* set up token with custom claim */
32- $ repository = new AccessTokenRepository (m::mock (TokenRepository::class), m:: mock ( Dispatcher::class));
33- $ client = new Client ('client-id ' , 'name ' , 'redirect ' );
32+ $ repository = new AccessTokenRepository (m::mock (Dispatcher::class));
33+ $ client = new Client ('client-id ' , 'name ' , [ 'redirect ' ] );
3434 $ keys = (new RSA ())->createKey (2048 );
3535 app ('config ' )->set ('passport-claims.claims ' , [MyClaim::class]);
3636 $ token = $ repository ->getNewToken ($ client , [], '' );
@@ -54,8 +54,8 @@ public function test_request_is_passed_along_if_claim_is_present_on_token()
5454 public function test_request_is_passed_along_if_claim_matches_a_value ()
5555 {
5656 /* set up token with custom claim */
57- $ repository = new AccessTokenRepository (m::mock (TokenRepository::class), m:: mock ( Dispatcher::class));
58- $ client = new Client ('client-id ' , 'name ' , 'redirect ' );
57+ $ repository = new AccessTokenRepository (m::mock (Dispatcher::class));
58+ $ client = new Client ('client-id ' , 'name ' , [ 'redirect ' ] );
5959 $ keys = (new RSA ())->createKey (2048 );
6060 app ('config ' )->set ('passport-claims.claims ' , [MyClaim::class]);
6161 $ token = $ repository ->getNewToken ($ client , [], '' );
@@ -79,8 +79,8 @@ public function test_request_is_passed_along_if_claim_matches_a_value()
7979 public function test_request_is_passed_along_if_claim_matches_a_value_from_many ()
8080 {
8181 /* set up token with custom claim */
82- $ repository = new AccessTokenRepository (m::mock (TokenRepository::class), m:: mock ( Dispatcher::class));
83- $ client = new Client ('client-id ' , 'name ' , 'redirect ' );
82+ $ repository = new AccessTokenRepository (m::mock (Dispatcher::class));
83+ $ client = new Client ('client-id ' , 'name ' , [ 'redirect ' ] );
8484 $ keys = (new RSA ())->createKey (2048 );
8585 app ('config ' )->set ('passport-claims.claims ' , [MyClaim::class]);
8686 $ token = $ repository ->getNewToken ($ client , [], '' );
@@ -106,8 +106,8 @@ public function test_exception_is_thrown_if_token_doesnt_have_claim()
106106 $ this ->expectException (AuthenticationException::class);
107107
108108 /* set up token without any custom claims */
109- $ repository = new AccessTokenRepository (m::mock (TokenRepository::class), m:: mock ( Dispatcher::class));
110- $ client = new Client ('client-id ' , 'name ' , 'redirect ' );
109+ $ repository = new AccessTokenRepository (m::mock (Dispatcher::class));
110+ $ client = new Client ('client-id ' , 'name ' , [ 'redirect ' ] );
111111 $ keys = (new RSA ())->createKey (2048 );
112112 $ token = $ repository ->getNewToken ($ client , [], '' );
113113 $ token ->setPrivateKey (new CryptKey ($ keys ['privatekey ' ]));
@@ -130,8 +130,8 @@ public function test_exception_is_thrown_if_claim_does_not_match_value()
130130 $ this ->expectException (AuthenticationException::class);
131131
132132 /* set up token with custom claim */
133- $ repository = new AccessTokenRepository (m::mock (TokenRepository::class), m:: mock ( Dispatcher::class));
134- $ client = new Client ('client-id ' , 'name ' , 'redirect ' );
133+ $ repository = new AccessTokenRepository (m::mock (Dispatcher::class));
134+ $ client = new Client ('client-id ' , 'name ' , [ 'redirect ' ] );
135135 $ keys = (new RSA ())->createKey (2048 );
136136 app ('config ' )->set ('passport-claims.claims ' , [MyClaim::class]);
137137 $ token = $ repository ->getNewToken ($ client , [], '' );
0 commit comments