GroupTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_gets_a_summary_of_a_group_by_id() 0 7 1
A it_gets_a_summary_of_a_group_by_name() 0 7 1
A checkClasses() 0 7 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