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

PermissionsHandlerTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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