예제 #1
0
 public function testValidateFailException()
 {
     $menu = new AuthenticatedMenu();
     $menu->setContainer($this->container);
     $this->container->shouldReceive('get')->once()->withArgs(['security.authorization_checker'])->andThrow(new AuthenticationCredentialsNotFoundException());
     $this->assertFalse($menu->validate());
     $this->security->shouldNotHaveReceived('isGranted');
 }
 /**
  * @covers \Ilios\CoreBundle\EventListener\TrackApiUsageListener::onKernelController
  */
 public function testTrackingIsDisabled()
 {
     $listener = new TrackApiUsageListener(false, $this->mockTracker, $this->mockLogger);
     $listener->onKernelController($this->mockEvent);
     $this->mockTracker->shouldNotHaveReceived('send');
 }