Skip to content

Commit

Permalink
Added new test case
Browse files Browse the repository at this point in the history
  • Loading branch information
GrizliK1988 committed Mar 26, 2016
1 parent ee8b310 commit f132545
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/Unit/CompilerPass/RegisterVotersPassTest.php
Expand Up @@ -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());
}
}

0 comments on commit f132545

Please sign in to comment.