Failed Conditions
Push — master ( 977552...4856db )
by Adrien
12:24
created

LatestModificationTest::tearDown()   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
declare(strict_types=1);
4
5
namespace ApplicationTest\Api\Input\Sorting;
6
7
use Application\Model\ExpenseClaim;
8
use Application\Model\User;
9
10
class LatestModificationTest extends AbstractSorting
11
{
12
    public function tearDown(): void
13
    {
14
        User::setCurrent(null);
15
    }
16
17
    public function testSorting(): void
18
    {
19
        /** @var User $user */
20
        $user = _em()->getRepository(User::class)->getByLogin('member');
21
        User::setCurrent($user);
22
23
        $result = $this->getSortedQueryResult(ExpenseClaim::class, 'latestModification');
24
        self::assertSame([
25
            7002,
26
            7001,
27
            7000,
28
        ], $result);
29
    }
30
}
31