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 (#240)
by Renato
25:10
created

ExpressionFunctionTest::testFunctionDoesNotExist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Overblog\GraphQLBundle\Tests\ExpressionLanguage;
4
5
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
6
use PHPUnit\Framework\TestCase;
7
8
class ExpressionFunctionTest extends TestCase
9
{
10
    public function testFunctionDoesNotExist()
11
    {
12
        $this->expectException(\InvalidArgumentException::class);
13
        $this->expectExceptionMessage('PHP function "fn_does_not_exist" does not exist.');
14
15
        ExpressionFunction::fromPhp('fn_does_not_exist');
16
    }
17
18
    public function testThereIsNoEvaluator()
19
    {
20
        $this->expectException(\RuntimeException::class);
21
        $this->expectExceptionMessage('Evaluator is not needed');
22
23
        $expressionFunction = new ExpressionFunction('name', function () {});
24
        $evaluator = $expressionFunction->getEvaluator();
25
26
        $this->assertTrue(is_callable($evaluator));
27
28
        $evaluator();
29
    }
30
}
31