Test Failed
Push — master ( c4c2e8...dd2174 )
by Elijah
03:37
created

PermissionsHandlerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testHandlerReadsDefinitions() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the EloyekunlePermissionsBundle package.
5
 *
6
 * (c) Elijah Oyekunle <https://elijahoyekunle.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Eloyekunle\PermissionsBundle\Tests\Util;
13
14
use Eloyekunle\PermissionsBundle\Util\PermissionsHandler;
15
use Eloyekunle\PermissionsBundle\Util\PermissionsHandlerInterface;
16
use PHPUnit\Framework\TestCase;
17
18
class PermissionsHandlerTest extends TestCase
19
{
20
    /** @var PermissionsHandlerInterface */
21
    protected $permissionsHandler;
22
23
    public function setUp()
24
    {
25
        $this->permissionsHandler = new PermissionsHandler(__DIR__.'/../Fixtures');
26
    }
27
28
    public function testHandlerReadsDefinitions()
29
    {
30
        $permissions = $this->permissionsHandler->getPermissions();
31
        $this->assertArrayHasKey('edit users', $permissions);
32
        $this->assertArrayHasKey('delete users', $permissions);
33
    }
34
}
35