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

Passed
Pull Request — master (#240)
by Renato
06:46
created

ExpressionFunctionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFunctionDoesNotExist() 0 7 1
A testThereIsNoEvaluator() 0 7 1
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
        (new ExpressionFunction('name', function () {}))->getEvaluator()();
24
    }
25
}
26