diff --git a/Tests/Unit/CompilerPass/RegisterVotersPassTest.php b/Tests/Unit/CompilerPass/RegisterVotersPassTest.php index 1f016b9..749409f 100644 --- a/Tests/Unit/CompilerPass/RegisterVotersPassTest.php +++ b/Tests/Unit/CompilerPass/RegisterVotersPassTest.php @@ -81,4 +81,22 @@ public function testProcessingOfSpecificVoters() $this->compiler->process($this->containerMock->reveal()); } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\LogicException + */ + public function testFailingOfCompiling() + { + $this->containerMock->hasDefinition('security.access.decision_manager')->willReturn(false); + + $this->containerMock->findTaggedServiceIds('security.specific_voter') + ->shouldBeCalled() + ->willReturn([ + 'voter_1' => [ + [] + ], + ]); + + $this->compiler->process($this->containerMock->reveal()); + } }