Completed
Push — master ( a0580c...57df1c )
by Tomasz
01:44
created

ResponseSpec::it_should_have_profile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\Aggrego\Domain\Api\Query\GetUnit;
4
5
use PhpSpec\ObjectBehavior;
6
use Aggrego\Domain\Api\Query\GetUnit\Response;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\Api\Query\GetUnit\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...
7
use Aggrego\Domain\Model\Unit\Entity\Unit;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\Model\Unit\Entity\Unit 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...
8
use Aggrego\Domain\ValueObject\Data;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Data 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 Aggrego\Domain\ValueObject\Key;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Key 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 Aggrego\Domain\ValueObject\Name;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Name 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
use Aggrego\Domain\ValueObject\Profile;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Profile 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...
12
use Aggrego\Domain\ValueObject\Version;
0 ignored issues
show
Bug introduced by
The type Aggrego\Domain\ValueObject\Version 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...
13
14
class ResponseSpec extends ObjectBehavior
15
{
16
    function let(Unit $unit)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
17
    {
18
        $unit->getKey()->willReturn(new Key([]));
19
        $unit->getProfile()->willReturn(new Profile(new Name('test'), new Version('1.0.0')));
20
        $unit->getData()->willReturn(new Data('test'));
21
        $this->beConstructedThrough('createValidResponse', [$unit]);
22
    }
23
24
    function it_is_initializable()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
25
    {
26
        $this->shouldHaveType(Response::class);
27
    }
28
29
    function it_should_have_profile()
30
    {
31
        $this->getProfileName()->shouldBeString();
0 ignored issues
show
Bug introduced by
The method getProfileName() does not exist on spec\Aggrego\Domain\Api\Query\GetUnit\ResponseSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
        $this->/** @scrutinizer ignore-call */ 
32
               getProfileName()->shouldBeString();
Loading history...
32
    }
33
34
    function it_should_have_version_number()
35
    {
36
        $this->getVersionNumber()->shouldBeString();
0 ignored issues
show
Bug introduced by
The method getVersionNumber() does not exist on spec\Aggrego\Domain\Api\Query\GetUnit\ResponseSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        $this->/** @scrutinizer ignore-call */ 
37
               getVersionNumber()->shouldBeString();
Loading history...
37
    }
38
39
    function it_should_have_status()
40
    {
41
        $this->getStatus()->shouldBeString();
0 ignored issues
show
Bug introduced by
The method getStatus() does not exist on spec\Aggrego\Domain\Api\Query\GetUnit\ResponseSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

41
        $this->/** @scrutinizer ignore-call */ 
42
               getStatus()->shouldBeString();
Loading history...
42
    }
43
44
    function it_should_have_body()
45
    {
46
        $this->getBody()->shouldBeString();
0 ignored issues
show
Bug introduced by
The method getBody() does not exist on spec\Aggrego\Domain\Api\Query\GetUnit\ResponseSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

46
        $this->/** @scrutinizer ignore-call */ 
47
               getBody()->shouldBeString();
Loading history...
47
    }
48
}
49