Failed Conditions
Push — master ( 3b5f31...7e5acf )
by Adrien
16:34
created

AgeTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ApplicationTest\Api\Input\Sorting;
6
7
use Application\Model\User;
8
use Ecodev\Felix\Testing\Api\Input\Sorting\AbstractSorting;
9
10
class AgeTest extends AbstractSorting
11
{
12
    protected function tearDown(): void
13
    {
14
        User::setCurrent(null);
15
    }
16
17
    public function testSorting(): void
18
    {
19
        $administrator = new User(User::ROLE_ADMINISTRATOR);
20
        User::setCurrent($administrator);
21
        $result = $this->getSortedQueryResult(_types(), User::class, 'age');
22
        self::assertSame([
23
            1004,
24
            1002,
25
            1012,
26
            1013,
27
            1014,
28
            1015,
29
            1010,
30
            1000,
31
            1007,
32
            1001,
33
            1005,
34
            1006,
35
            1008,
36
            1009,
37
            1003,
38
            1011,
39
        ], $result);
40
    }
41
}
42