Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#265)
by Jérémiah
23:39 queued 10:37
created

HasAnyPermissionTest::testHasAnyPermission()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 29
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
1
<?php
2
3
namespace Overblog\GraphQLBundle\Tests\ExpressionLanguage\ExpressionFunction\Security;
4
5
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\Security\HasAnyPermission;
6
use Overblog\GraphQLBundle\Tests\ExpressionLanguage\TestCase;
7
8
class HasAnyPermissionTest extends TestCase
9
{
10
    protected function getFunctions()
11
    {
12
        return [new HasAnyPermission()];
13
    }
14
15
    public function testHasAnyPermission()
16
    {
17
        $object = new \stdClass();
18
19
        $this->assertExpressionCompile(
20
            'hasAnyPermission(object,["OWNER", "WRITER"])',
21
            [
22
                $this->matchesRegularExpression('/^(OWNER|WRITER)$/'),
23
                $this->identicalTo($object),
24
            ],
25
            [
26
                'object' => $object,
27
            ]
28
        );
29
30
        $this->assertExpressionCompile(
31
            'hasAnyPermission(object,["OWNER", "WRITER"])',
32
            [
33
                $this->matchesRegularExpression('/^(OWNER|WRITER)$/'),
34
                $this->identicalTo($object),
35
            ],
36
            [
37
                'object' => $object,
38
            ],
39
            $this->exactly(2),
40
            false,
41
            'assertFalse'
42
        );
43
    }
44
}
45