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

AccountTest::testShow()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Resources;
4
5
use Guillermoandrae\Highrise\Resources\Account;
6
use GuillermoandraeTest\Highrise\TestCase;
7
8
class AccountTest extends TestCase
9
{
10
    /**
11
     * @var Account
12
     */
13
    private $resource;
14
15
    public function testShow()
16
    {
17
        $account = $this->resource->show();
18
        $this->assertSame('test', $account['name']);
19
    }
20
21
    public function testFind()
22
    {
23
        $this->expectExceptionMessage('The find method of this resource is not supported');
24
        $this->resource->find('test');
25
    }
26
27
    public function testFindAll()
28
    {
29
        $this->expectExceptionMessage('The findAll method of this resource is not supported');
30
        $this->resource->findAll();
31
    }
32
33
    public function testSearch()
34
    {
35
        $this->expectExceptionMessage('The search method of this resource is not supported');
36
        $this->resource->search();
37
    }
38
39
    protected function setUp()
40
    {
41
        $client = $this->getMockClient(200, [], '<account><name>test</name></account>');
42
        $this->resource = new Account($this->getAdapter($client));
43
    }
44
}
45