mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
refactor ACL for easy voter. Apply on TaskVoter
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Tests\Security\Resolver;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Security\Resolver\CenterResolverDispatcher;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
class CenterResolverDispatcherTest extends KernelTestCase
|
||||
{
|
||||
private CenterResolverDispatcher $dispatcher;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->dispatcher = self::$container->get(CenterResolverDispatcher::class);
|
||||
}
|
||||
|
||||
public function testResolveCenter()
|
||||
{
|
||||
$center = new Center();
|
||||
|
||||
$resolved = $this->dispatcher->resolveCenter($center);
|
||||
|
||||
$this->assertSame($center, $resolved);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user