/**
  * @test
  */
 public function onCoreRequest_pathExcluded_notRequestAuthenticationCode()
 {
     $event = $this->createEvent("/exclude/someFile");
     $token = $this->createSupportedSecurityToken();
     $this->stubSecurityContext($token);
     //Expect TwoFactorProvider to be called
     $this->authHandler->expects($this->never())->method("requestAuthenticationCode");
     $this->listener->onCoreRequest($event);
 }
 /**
  * @test
  */
 public function onCoreRequest_NotLoggedInUser_notRequestAuthenticationCode()
 {
     $event = $this->createEvent();
     // simulate a not logged in user
     $this->stubTokenStorage(null);
     //Expect TwoFactorProvider not to be called
     $this->authHandler->expects($this->never())->method('requestAuthenticationCode');
     $this->listener->onCoreRequest($event);
 }