GroupTest::checkClasses()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
require_once('BaseTester.php');
4
5
/** @group Group */
6
class GroupTest extends BaseTester {
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: artisan, be, call, seed
Loading history...
7
8
    /** @test */
9
    public function it_gets_a_summary_of_a_group_by_id()
10
    {
11
        $group = $this->steamClient->group()->GetGroupSummary($this->groupId);
12
13
        $this->checkGroupProperties($group);
14
        $this->checkClasses($group);
15
    }
16
17
    /** @test */
18
    public function it_gets_a_summary_of_a_group_by_name()
19
    {
20
        $group = $this->steamClient->group()->GetGroupSummary($this->groupName);
21
22
        $this->checkGroupProperties($group);
23
        $this->checkClasses($group);
24
    }
25
26
    /**
27
     * @param $group
28
     */
29
    protected function checkClasses($group)
30
    {
31
        $this->assertInstanceOf('Syntax\SteamApi\Containers\Group', $group);
32
        $this->assertInstanceOf('Syntax\SteamApi\Containers\Group\Details', $group->groupDetails);
33
        $this->assertInstanceOf('Syntax\SteamApi\Containers\Group\MemberDetails', $group->memberDetails);
34
        $this->assertInstanceOf('Illuminate\Support\Collection', $group->members);
35
    }
36
37
}
38