Completed
Push — master ( 037cc5...776a32 )
by Guillermo A.
09:42
created

UnsearchableResourceTraitTest::testSearch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
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
        $resource = $this->getMockForTrait(UnsearchableRepositoryTrait::class);
14
        $resource->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
        $resource->/** @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