예제 #1
0
 public function testActsLikeLastWithNoDisplayedItem()
 {
     $this->pt1->setDisplay(false);
     $this->pt2->setDisplay(false);
     $this->assertFalse($this->pt1->actsLikeLast());
     $this->assertFalse($this->pt2->actsLikeLast());
 }
 public function visitMenuItem(MenuItem $item)
 {
     try {
         $request = $this->getClonedRequest($item->getUri());
         $event = new GetResponseEvent($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST);
         $this->accessListener->handle($event);
     } catch (AccessDeniedException $e) {
         $item->setDisplay(false);
     } catch (AuthenticationCredentialsNotFoundException $e) {
     }
 }