1 | <?php |
||||||
2 | /** |
||||||
3 | * |
||||||
4 | * This file is part of the Aggrego. |
||||||
5 | * (c) Tomasz Kunicki <[email protected]> |
||||||
6 | * |
||||||
7 | * For the full copyright and license information, please view the LICENSE |
||||||
8 | * file that was distributed with this source code. |
||||||
9 | * |
||||||
10 | */ |
||||||
11 | |||||||
12 | declare(strict_types = 1); |
||||||
13 | |||||||
14 | namespace spec\Aggrego\DomainEventProducer\Domain; |
||||||
15 | |||||||
16 | use Aggrego\Domain\Board\Board; |
||||||
17 | use Aggrego\Domain\Board\Repository as DomainRepository; |
||||||
18 | use Aggrego\Domain\Board\Uuid; |
||||||
19 | use Aggrego\DomainEventProducer\Domain\Repository; |
||||||
20 | use PhpSpec\ObjectBehavior; |
||||||
21 | |||||||
22 | class RepositorySpec extends ObjectBehavior |
||||||
23 | { |
||||||
24 | function let(DomainRepository $repository) |
||||||
0 ignored issues
–
show
|
|||||||
25 | { |
||||||
26 | $this->beConstructedWith($repository); |
||||||
27 | } |
||||||
28 | |||||||
29 | function it_is_initializable() |
||||||
0 ignored issues
–
show
|
|||||||
30 | { |
||||||
31 | $this->shouldHaveType(Repository::class); |
||||||
32 | $this->shouldHaveType(DomainRepository::class); |
||||||
33 | } |
||||||
34 | |||||||
35 | function it_should_add_board(Board $board) |
||||||
36 | { |
||||||
37 | $board->getUuid()->willReturn(new Uuid('ff6f8cb0-c57d-11e1-9b21-0800200c9a66')); |
||||||
0 ignored issues
–
show
The method
willReturn() does not exist on Aggrego\Domain\Board\Uuid .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
38 | $this->addBoard($board)->shouldReturn(null); |
||||||
0 ignored issues
–
show
The method
addBoard() does not exist on spec\Aggrego\DomainEvent...r\Domain\RepositorySpec . 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
![]() |
|||||||
39 | } |
||||||
40 | |||||||
41 | function it_get_board_by_uuid(DomainRepository $repository, Board $board) |
||||||
42 | { |
||||||
43 | $repository->getBoardByUuid(new Uuid('ff6f8cb0-c57d-11e1-9b21-0800200c9a66'))->willReturn($board); |
||||||
0 ignored issues
–
show
The method
willReturn() does not exist on Aggrego\Domain\Board\Board .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
44 | $this->beConstructedWith($repository); |
||||||
45 | |||||||
46 | $this->getBoardByUuid(new Uuid('ff6f8cb0-c57d-11e1-9b21-0800200c9a66'))->shouldBeAnInstanceOf(Board::class); |
||||||
0 ignored issues
–
show
The method
getBoardByUuid() does not exist on spec\Aggrego\DomainEvent...r\Domain\RepositorySpec . 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
![]() |
|||||||
47 | } |
||||||
48 | } |
||||||
49 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.