use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\CacheableVoterInterface;
use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
use Symfony\Component\Security\Core\Event\VoteEvent;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
class TraceableVoterTest extends TestCase
{ public function testGetDecoratedVoterClass() { $voter =
$this->
getMockBuilder(VoterInterface::
class)->
getMockForAbstractClass();
$sut =
new TraceableVoter($voter,
$this->
getMockBuilder(EventDispatcherInterface::
class)->
getMockForAbstractClass());
$this->
assertSame($voter,
$sut->
getDecoratedVoter());
} public function testVote() { $voter =
$this->
getMockBuilder(VoterInterface::
class)->
getMockForAbstractClass();
$eventDispatcher =
$this->
getMockBuilder(EventDispatcherInterface::
class)->
getMockForAbstractClass();
$token =
$this->
getMockBuilder(TokenInterface::
class)->
getMockForAbstractClass();