1 | <?php |
||
21 | class ParticipantProviderSecurityContextTest extends \PHPUnit_Framework_TestCase |
||
22 | { |
||
23 | /** |
||
24 | * The class under test |
||
25 | * |
||
26 | * @var ParticipantProviderSecurityContext |
||
27 | */ |
||
28 | private $participantProvider; |
||
29 | |||
30 | /** |
||
31 | * @var \PHPUnit_Framework_MockObject_MockObject |
||
32 | */ |
||
33 | private $securityContext; |
||
34 | |||
35 | /** |
||
36 | * @var \PHPUnit_Framework_MockObject_MockObject |
||
37 | */ |
||
38 | private $securityToken; |
||
39 | |||
40 | public function setUp() |
||
46 | |||
47 | public function testInterface() |
||
51 | |||
52 | /** |
||
53 | * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException |
||
54 | * @expectedExceptionMessage You must be logged in with a participant interface |
||
55 | */ |
||
56 | public function testGetAuthenticatedParticipantTokenReturnsString() |
||
62 | |||
63 | /** |
||
64 | * @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException |
||
65 | * @expectedExceptionMessage You must be logged in with a participant interface |
||
66 | */ |
||
67 | public function testGetAuthenticatedParticpantReturnsObjectNotInstanceParticipantInterface() |
||
74 | |||
75 | public function testGetAuthenticatedParticipantReturnsParticipant() |
||
83 | |||
84 | protected function expectsToken() |
||
89 | } |
||
90 |