Passed
Push — master ( 4a3e7e...eed543 )
by Guillermo A.
01:38
created

UnsearchableResourceTraitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
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\Resources;
4
5
use Guillermoandrae\Highrise\Resources\UnsearchableResourceTrait;
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 resource is not supported');
13
        $resource = $this->getMockForTrait(UnsearchableResourceTrait::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