File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
tests/unit/LucaDegasperi/OAuth2Server/Filters Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public function validateScopes()
104
104
{
105
105
foreach ($ this ->scopes as $ scope ) {
106
106
if (!$ this ->authorizer ->hasScope ($ scope )) {
107
- throw new InvalidScopeException (implode ( ' , ' , $ this -> scopes ) );
107
+ throw new InvalidScopeException ($ scope );
108
108
}
109
109
}
110
110
}
Original file line number Diff line number Diff line change @@ -28,16 +28,16 @@ function it_filters_against_invalid_access_tokens(Authorizer $authorizer)
28
28
function it_filters_against_invalid_scopes (Authorizer $ authorizer )
29
29
{
30
30
$ authorizer ->validateAccessToken (false )->willReturn ('foo ' )->shouldBeCalled ();
31
- $ authorizer ->hasScope ([ 'baz ' ] )->willReturn (false )->shouldBeCalled ();
31
+ $ authorizer ->hasScope ('baz ' )->willReturn (false )->shouldBeCalled ();
32
32
33
33
$ this ->shouldThrow ('\League\OAuth2\Server\Exception\InvalidScopeException ' )
34
34
->duringFilter ('foo ' , 'bar ' , 'baz ' );
35
35
}
36
36
37
- function it_passes_with_valud_scopes (Authorizer $ authorizer )
37
+ function it_passes_with_valid_scopes (Authorizer $ authorizer )
38
38
{
39
39
$ authorizer ->validateAccessToken (false )->willReturn ('foo ' )->shouldBeCalled ();
40
- $ authorizer ->hasScope ([ 'baz ' ] )->willReturn (true )->shouldBeCalled ();
40
+ $ authorizer ->hasScope ('baz ' )->willReturn (true )->shouldBeCalled ();
41
41
42
42
$ this ->filter ('foo ' , 'bar ' , 'baz ' )->shouldReturn (null );
43
43
}
You can’t perform that action at this time.
0 commit comments