RequestAssertTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testSuccessfullyRequest() 0 5 1
A testThrowExceptionWhenRequestIsMissing() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Tests\Crossword\Features\Receiver\Request;
6
7
use App\Crossword\Features\Receiver\Request\RequestAssert;
8
use App\Crossword\Features\Receiver\Request\RequestException;
9
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use Symfony\Component\HttpFoundation\Request;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\HttpFoundation\Request was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
12
/**
13
 * @coversDefaultClass \App\Crossword\Features\Receiver\Request\RequestAssert
14
 */
15
final class RequestAssertTest extends TestCase
16
{
17
    /**
18
     * @covers ::missingRequest
19
     */
20
    public function testThrowExceptionWhenRequestIsMissing(): void
21
    {
22
        $this->expectException(RequestException::class);
23
24
        RequestAssert::missingRequest(null);
25
    }
26
27
    /**
28
     * @covers ::missingRequest
29
     */
30
    public function testSuccessfullyRequest(): void
31
    {
32
        RequestAssert::missingRequest(new Request());
33
34
        self::assertTrue(true);
35
    }
36
}
37