Passed
Push — master ( a8b983...5b3176 )
by Adrien
10:48
created

OrderRepositoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A providerGetAccessibleSubQuery() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApplicationTest\Repository;
6
7
use Application\Model\Order;
8
use Application\Repository\OrderRepository;
9
use ApplicationTest\Traits\LimitedAccessSubQuery;
10
11
/**
12
 * @group Repository
13
 */
14
class OrderRepositoryTest extends AbstractRepositoryTest
15
{
16
    use LimitedAccessSubQuery;
17
18
    /**
19
     * @var OrderRepository
20
     */
21
    private $repository;
22
23
    protected function setUp(): void
24
    {
25
        parent::setUp();
26
        $this->repository = _em()->getRepository(Order::class);
27
    }
28
29
    public function providerGetAccessibleSubQuery(): array
30
    {
31
        $all = [16000, 16001, 16002, 16003];
32
        $family = $all;
0 ignored issues
show
Unused Code introduced by
The assignment to $family is dead and can be removed.
Loading history...
33
34
        return [
35
            ['anonymous', []],
36
            ['member', [16000]],
37
            ['facilitator', $all],
38
            ['administrator', $all],
39
        ];
40
    }
41
}
42