Test Failed
Push — master ( 85ca69...144c12 )
by Roman
15:41
created

ResponseDataExtractorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
c 0
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSuccessfullyExtractDataFromResponse() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Tests\Crossword\Infrastructure\HttpClient;
6
7
use App\Crossword\Infrastructure\HttpClient\ResponseDataExtractor;
8
use GuzzleHttp\Psr7\Response;
0 ignored issues
show
Bug introduced by
The type GuzzleHttp\Psr7\Response 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...
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
11
/**
12
 * @coversDefaultClass \App\Crossword\Infrastructure\HttpClient\ResponseDataExtractor
13
 */
14
final class ResponseDataExtractorTest extends TestCase
15
{
16
    /**
17
     * @covers ::extract
18
     */
19
    public function testSuccessfullyExtractDataFromResponse(): void
20
    {
21
        $body = ['data' => 'test'];
22
23
        $response = new Response(200, ['Content-Type' => 'application/json'], json_encode($body));
24
        $responseDataExtractor = new ResponseDataExtractor();
25
26
        self::assertSame($responseDataExtractor->extract($response), $body);
27
    }
28
}
29