GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 4.2-to-master ( ed215f )
by E
06:47
created

IsContextUsableTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFalse() 0 16 1
A testTrue() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace ApiGen\Tests\Generator\Resolvers\ElementResolver;
4
5
use ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface;
6
use ApiGen\Contracts\Parser\Reflection\ConstantReflectionInterface;
7
use ApiGen\Contracts\Parser\Reflection\FunctionReflectionInterface;
8
use ApiGen\Tests\MethodInvoker;
9
10
final class IsContextUsableTest extends AbstractElementResolverTest
11
{
12
    public function testFalse(): void
13
    {
14
        $this->assertFalse(
15
            MethodInvoker::callMethodOnObject($this->elementResolver, 'isContextUsable', [null])
16
        );
17
18
        $reflectionConstantMock = $this->createMock(ConstantReflectionInterface::class);
19
        $this->assertFalse(
20
            MethodInvoker::callMethodOnObject($this->elementResolver, 'isContextUsable', [$reflectionConstantMock])
21
        );
22
23
        $reflectionFunctionMock = $this->createMock(FunctionReflectionInterface::class);
24
        $this->assertFalse(
25
            MethodInvoker::callMethodOnObject($this->elementResolver, 'isContextUsable', [$reflectionFunctionMock])
26
        );
27
    }
28
29
    public function testTrue(): void
30
    {
31
        $reflectionClassMock = $this->createMock(ClassReflectionInterface::class);
32
        $this->assertTrue(
33
            MethodInvoker::callMethodOnObject($this->elementResolver, 'isContextUsable', [$reflectionClassMock])
34
        );
35
    }
36
}
37