1 | <?php |
||||||||||
2 | |||||||||||
3 | namespace Nip\MailModule\Tests\EmailsTable; |
||||||||||
4 | |||||||||||
5 | use Mockery\Mock; |
||||||||||
0 ignored issues
–
show
|
|||||||||||
6 | use Nip\Database\Query\Insert; |
||||||||||
7 | use Nip\MailModule\Tests\AbstractTest; |
||||||||||
8 | use Nip\MailModule\Tests\Fixtures\Models\Emails\Email; |
||||||||||
9 | use Nip\MailModule\Tests\Fixtures\Models\Emails\Emails; |
||||||||||
10 | |||||||||||
11 | /** |
||||||||||
12 | * Class EmailsTraitTest |
||||||||||
13 | * @package Nip\MailModule\Tests\EmailsTable |
||||||||||
14 | */ |
||||||||||
15 | class EmailsTraitTest extends AbstractTest |
||||||||||
16 | { |
||||||||||
17 | public function test_sent_no_on_insert() |
||||||||||
18 | { |
||||||||||
19 | $email = new Email(); |
||||||||||
20 | |||||||||||
21 | /** @var Emails|Mock $emails */ |
||||||||||
22 | $emails = \Mockery::mock(Emails::class)->shouldAllowMockingProtectedMethods()->makePartial(); |
||||||||||
0 ignored issues
–
show
The type
Mockery 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||||||||
23 | $emails->shouldReceive('insertQuery')->andReturn(new Insert()); |
||||||||||
0 ignored issues
–
show
The method
andReturn() does not exist on Nip\Records\Collections\Collection .
(
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. ![]() The method
andReturn() does not exist on Nip\MailModule\Tests\Fixtures\Models\Emails\Emails . 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
![]() The method
shouldReceive() does not exist on Nip\MailModule\Tests\Fixtures\Models\Emails\Emails . 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
![]() |
|||||||||||
24 | $emails->shouldReceive('performInsert')->andReturn(true); |
||||||||||
25 | |||||||||||
26 | $emails->bootEmailsTrait(); |
||||||||||
27 | |||||||||||
28 | $emails->insert($email); |
||||||||||
29 | self::assertSame('no', $email->get('sent')); |
||||||||||
30 | } |
||||||||||
31 | } |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths