mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized menu
This commit is contained in:
@@ -13,6 +13,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Infinito\Domain\FixtureManagement\FixtureSource\GuestUserFixtureSource;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -79,7 +80,8 @@ class UserMenuSubscriberIntegrationTest extends KernelTestCase
|
||||
$menuEvent = new MenuEvent($factory, $item, $requests);
|
||||
$this->subscriber->onUserMenuConfigure($menuEvent);
|
||||
$children = $menuEvent->getItem()->getChildren()['user']->getChildren();
|
||||
$unauthentificatedItems = ['login', 'register'];
|
||||
$guestUserName = (new GuestUserFixtureSource())->getName();
|
||||
$unauthentificatedItems = ['login', 'register', $guestUserName];
|
||||
foreach ($unauthentificatedItems as $key) {
|
||||
$this->assertInstanceOf(MenuItem::class, $children[$key]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user