PeopleTest::testFindByCompanyId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Repositories;
4
5
use GuillermoandraeTest\Highrise\TestCase;
6
7
class PeopleTest extends TestCase
8
{
9
    public function testFindByCompanyId()
10
    {
11
        $id = 10;
12
        $body = '<people type="array"><person>1</person></people>';
13
        $repository = $this->getMockRepository('people', $body);
14
        $repository->findByCompanyId($id);
0 ignored issues
show
Bug introduced by
The method findByCompanyId() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...tories\PeopleRepository or Guillermoandrae\Highrise...tories\PeopleRepository. ( 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
                     findByCompanyId($id);
Loading history...
15
        $this->assertSameLastRequestUri("/companies/$id/people.xml", $repository);
16
    }
17
}
18