This repository was archived by the owner on May 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77use mako \application \Application ;
88use mako \config \Config ;
99use mako \gatekeeper \adapters \AdapterInterface ;
10- use mako \gatekeeper \Authentication ;
10+ use mako \gatekeeper \Gatekeeper ;
1111use mako \http \Request ;
1212use mako \http \routing \URLBuilder ;
1313use mako \i18n \I18n ;
@@ -281,7 +281,7 @@ function gatekeeper(string $adapterName = null): AdapterInterface
281281
282282 if ($ gatekeeper === null )
283283 {
284- $ gatekeeper = Application::instance ()->getContainer ()->get (Authentication ::class);
284+ $ gatekeeper = Application::instance ()->getContainer ()->get (Gatekeeper ::class);
285285 }
286286
287287 return $ gatekeeper ->adapter ($ adapterName );
Original file line number Diff line number Diff line change @@ -327,11 +327,11 @@ public function testGatekeeper(): void
327327
328328 $ container = Mockery::mock ('alias:mako\syringe\Container ' );
329329
330- $ authentication = Mockery::mock ('alias:mako\gatekeeper\Authentication ' );
330+ $ authentication = Mockery::mock ('alias:mako\gatekeeper\Gatekeeper ' );
331331
332332 $ authentication ->shouldReceive ('adapter ' )->times (2 )->with (null )->andReturn (Mockery::mock ('mako\gatekeeper\adapters\AdapterInterface ' ));
333333
334- $ container ->shouldReceive ('get ' )->once ()->with ('mako\gatekeeper\Authentication ' )->andReturn ($ authentication );
334+ $ container ->shouldReceive ('get ' )->once ()->with ('mako\gatekeeper\Gatekeeper ' )->andReturn ($ authentication );
335335
336336 $ mock ->shouldReceive ('getContainer ' )->once ()->andReturn ($ container );
337337
@@ -351,15 +351,15 @@ public function testUser(): void
351351
352352 $ container = Mockery::mock ('alias:mako\syringe\Container ' );
353353
354- $ authentication = Mockery::mock ('alias:mako\gatekeeper\Authentication ' );
354+ $ authentication = Mockery::mock ('alias:mako\gatekeeper\Gatekeeper ' );
355355
356356 $ adapter = Mockery::mock ('alias:mako\gatekeeper\adapters\AdapterInterface ' );
357357
358358 $ adapter ->shouldReceive ('getUser ' )->times (2 )->andReturn (null );
359359
360360 $ authentication ->shouldReceive ('adapter ' )->times (2 )->with (null )->andReturn ($ adapter );
361361
362- $ container ->shouldReceive ('get ' )->once ()->with ('mako\gatekeeper\Authentication ' )->andReturn ($ authentication );
362+ $ container ->shouldReceive ('get ' )->once ()->with ('mako\gatekeeper\Gatekeeper ' )->andReturn ($ authentication );
363363
364364 $ mock ->shouldReceive ('getContainer ' )->once ()->andReturn ($ container );
365365
You can’t perform that action at this time.
0 commit comments