@@ -36,7 +36,7 @@ public function testExceptionThrownWhenNoScopesProvided()
3636
3737 $ route = m::mock ('Dingo\Api\Routing\Route ' );
3838 $ route ->shouldReceive ('scopes ' )->once ()->andReturn (['foo ' ]);
39- $ route ->shouldReceive ('requiresAllScopes ' )->once ()->andReturn (false );
39+ $ route ->shouldReceive ('scopeStrict ' )->once ()->andReturn (false );
4040
4141 $ this ->provider ->authenticate ($ request , $ route );
4242 }
@@ -63,7 +63,7 @@ public function testOnlyOneScopeRequiredToValidateCorrectlyIfRequiredAllSetToFal
6363
6464 $ route = m::mock ('Dingo\Api\Routing\Route ' );
6565 $ route ->shouldReceive ('scopes ' )->once ()->andReturn (['foo ' , 'bar ' ]);
66- $ route ->shouldReceive ('requiresAllScopes ' )->once ()->andReturn (false );
66+ $ route ->shouldReceive ('scopeStrict ' )->once ()->andReturn (false );
6767
6868 $ this ->assertNull ($ this ->provider ->authenticate ($ request , $ route ));
6969 }
@@ -76,19 +76,19 @@ public function testAllScopeRequiredToValidateCorrectlyIfRequiredAllSetToTrue()
7676 $ request = Request::create ('GET ' , '/ ' , [], [], [], ['HTTP_AUTHORIZATION ' => 'Bearer 12345 ' ]);
7777
7878 $ this ->server ->shouldReceive ('isValidRequest ' )->once ()->andReturn (true );
79-
79+
8080 $ token = m::mock ('League\OAuth2\Server\Entity\AccessTokenEntity ' );
8181 $ token ->shouldReceive ('hasScope ' )->once ()->with ('foo ' )->andReturn (true );
8282 $ token ->shouldReceive ('hasScope ' )->once ()->with ('bar ' )->andReturn (false );
8383 $ this ->server ->shouldReceive ('getAccessToken ' )->once ()->andReturn ($ token );
84-
84+
8585 $ this ->provider ->setClientResolver (function ($ id ) {
8686 //
8787 });
88-
88+
8989 $ route = m::mock ('Dingo\Api\Routing\Route ' );
9090 $ route ->shouldReceive ('scopes ' )->once ()->andReturn (['foo ' , 'bar ' ]);
91- $ route ->shouldReceive ('requiresAllScopes ' )->once ()->andReturn (true );
91+ $ route ->shouldReceive ('scopeStrict ' )->once ()->andReturn (true );
9292
9393 $ this ->provider ->authenticate ($ request , $ route );
9494 }
@@ -114,7 +114,7 @@ public function testClientIsResolved()
114114
115115 $ route = m::mock ('Dingo\Api\Routing\Route ' );
116116 $ route ->shouldReceive ('scopes ' )->once ()->andReturn ([]);
117- $ route ->shouldReceive ('requiresAllScopes ' )->once ()->andReturn (false );
117+ $ route ->shouldReceive ('scopeStrict ' )->once ()->andReturn (false );
118118
119119 $ this ->assertEquals ('foo ' , $ this ->provider ->authenticate ($ request , $ route ));
120120 }
@@ -140,7 +140,7 @@ public function testUserIsResolved()
140140
141141 $ route = m::mock ('Dingo\Api\Routing\Route ' );
142142 $ route ->shouldReceive ('scopes ' )->once ()->andReturn ([]);
143- $ route ->shouldReceive ('requiresAllScopes ' )->once ()->andReturn (false );
143+ $ route ->shouldReceive ('scopeStrict ' )->once ()->andReturn (false );
144144
145145 $ this ->assertEquals ('foo ' , $ this ->provider ->authenticate ($ request , $ route ));
146146 }
0 commit comments