Failed Conditions
Push — master ( 2fcedf...efe7fa )
by Guillermo A.
01:42
created

CasesTest::testFindOpen()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Resources;
4
5
class CasesTest extends TestCase
6
{
7
    public function testFindAll()
8
    {
9
        $body = '<kases type="array"><kase><id>1</id></kase><kase><id>2</id></kase></kases>';
10
        $resource = $this->getMockResource('cases', $body);
11
        $results = $resource->findAll();
12
        $this->assertSameLastRequestUri('/kases/open.xml', $resource);
13
        $this->assertCount(2, $results);
14
    }
15
16
    public function testFindOpen()
17
    {
18
        $body = '<kases type="array"><kase><id>1</id></kase><kase><id>2</id></kase></kases>';
19
        $resource = $this->getMockResource('cases', $body);
20
        $results = $resource->findOpen();
0 ignored issues
show
Bug introduced by
The method findOpen() does not exist on Guillermoandrae\Highrise...urces\ResourceInterface. It seems like you code against a sub-type of Guillermoandrae\Highrise...urces\ResourceInterface such as Guillermoandrae\Highrise\Resources\Cases. ( Ignorable by Annotation )

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

20
        /** @scrutinizer ignore-call */ 
21
        $results = $resource->findOpen();
Loading history...
21
        $this->assertSameLastRequestUri('/kases/open.xml', $resource);
22
        $this->assertCount(2, $results);
23
    }
24
25
    public function testFindClosed()
26
    {
27
        $body = '<kases type="array"><kase><id>1</id></kase><kase><id>2</id></kase></kases>';
28
        $resource = $this->getMockResource('cases', $body);
29
        $results = $resource->findClosed();
0 ignored issues
show
Bug introduced by
The method findClosed() does not exist on Guillermoandrae\Highrise...urces\ResourceInterface. It seems like you code against a sub-type of Guillermoandrae\Highrise...urces\ResourceInterface such as Guillermoandrae\Highrise\Resources\Cases. ( Ignorable by Annotation )

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

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