Completed
Push — master ( ab511a...a15fad )
by Sylvain
15:21
created

AgeTest::testSorting()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

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