| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function testIsGranted() |
||
| 35 | { |
||
| 36 | $request = $this->getSimpleTestDouble('\Symfony\Component\HttpFoundation\Request', array('getPathInfo')); |
||
| 37 | $request |
||
| 38 | ->expects($this->once()) |
||
| 39 | ->method('getPathInfo') |
||
| 40 | ->willReturn('/app/core'); |
||
| 41 | |||
| 42 | $voter = $this->getProxyBuilder('\Graviton\SecurityBundle\Voter\ServiceAllowedVoter') |
||
| 43 | ->setConstructorArgs(array($this->whitelist)) |
||
| 44 | ->setMethods(array('voteOnAttribute')) |
||
| 45 | ->getProxy(); |
||
| 46 | |||
| 47 | $token = $this |
||
| 48 | ->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface') |
||
| 49 | ->getMock(); |
||
| 50 | |||
| 51 | $this->assertTrue($voter->voteOnAttribute('VIEW', $request, $token)); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |