Completed
Push — master ( 0d4b62...49eab6 )
by Adrien
07:35
created

MessageRepositoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A providerGetAccessibleSubQuery() 0 12 1
A setUp() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApplicationTest\Repository;
6
7
use Application\Model\Message;
8
use Application\Repository\MessageRepository;
9
use ApplicationTest\Traits\LimitedAccessSubQuery;
10
11
class MessageRepositoryTest extends AbstractRepositoryTest
12
{
13
    use LimitedAccessSubQuery;
14
15
    /**
16
     * @var MessageRepository
17
     */
18
    private $repository;
19
20
    public function setUp(): void
21
    {
22
        parent::setUp();
23
        $this->repository = _em()->getRepository(Message::class);
24
    }
25
26
    public function providerGetAccessibleSubQuery(): array
27
    {
28
        // Nobody can see all messages for now, even administrator, because it's useless
29
        $all = [11001, 11002];
0 ignored issues
show
Unused Code introduced by
The assignment to $all is dead and can be removed.
Loading history...
30
31
        return [
32
            ['anonymous', []],
33
            ['bookingonly', []],
34
            ['individual', []],
35
            ['member', [11001]],
36
            ['responsible', []],
37
            ['administrator', []],
38
        ];
39
    }
40
}
41