UnsearchableResourceTraitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSearch() 0 5 1
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Repositories;
4
5
use Guillermoandrae\Highrise\Repositories\UnsearchableRepositoryTrait;
6
use GuillermoandraeTest\Highrise\TestCase;
7
8
class UnsearchableResourceTraitTest extends TestCase
9
{
10
    public function testSearch()
11
    {
12
        $this->expectExceptionMessage('The search method of this repository is not supported');
13
        $repository = $this->getMockForTrait(UnsearchableRepositoryTrait::class);
14
        $repository->search();
0 ignored issues
show
Bug introduced by
The method search() does not exist on PHPUnit\Framework\MockObject\MockObject. ( Ignorable by Annotation )

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

14
        $repository->/** @scrutinizer ignore-call */ 
15
                     search();

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.

Loading history...
15
    }
16
}
17