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

CasesTest::testFindAll()   A

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 CasesTest extends TestCase
8
{
9
    public function testFindAll()
10
    {
11
        $body = $this->getMockModels('case');
12
        $resource = $this->getMockRepository('cases', $body);
13
        $results = $resource->findAll();
14
        $this->assertSameLastRequestUri('/kases/open.xml', $resource);
15
        $this->assertCount(2, $results);
16
    }
17
18
    public function testFindOpen()
19
    {
20
        $body = $this->getMockModels('case');
21
        $resource = $this->getMockRepository('cases', $body);
22
        $results = $resource->findOpen();
0 ignored issues
show
Bug introduced by
The method findOpen() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\CasesRepository or Guillermoandrae\Highrise...itories\CasesRepository. ( Ignorable by Annotation )

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

22
        /** @scrutinizer ignore-call */ 
23
        $results = $resource->findOpen();
Loading history...
23
        $this->assertSameLastRequestUri('/kases/open.xml', $resource);
24
        $this->assertCount(2, $results);
25
    }
26
27
    public function testFindClosed()
28
    {
29
        $body = $this->getMockModels('case');
30
        $resource = $this->getMockRepository('cases', $body);
31
        $results = $resource->findClosed();
0 ignored issues
show
Bug introduced by
The method findClosed() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\CasesRepository or Guillermoandrae\Highrise...itories\CasesRepository. ( Ignorable by Annotation )

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

31
        /** @scrutinizer ignore-call */ 
32
        $results = $resource->findClosed();
Loading history...
32
        $this->assertSameLastRequestUri('/kases/closed.xml', $resource);
33
        $this->assertCount(2, $results);
34
    }
35
}
36