-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathGroupTest.php
37 lines (29 loc) · 1.07 KB
/
GroupTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
require_once('BaseTester.php');
/** @group Group */
class GroupTest extends BaseTester {
/** @test */
public function it_gets_a_summary_of_a_group_by_id()
{
$group = $this->steamClient->group()->GetGroupSummary($this->groupId);
$this->checkGroupProperties($group);
$this->checkClasses($group);
}
/** @test */
public function it_gets_a_summary_of_a_group_by_name()
{
$group = $this->steamClient->group()->GetGroupSummary($this->groupName);
$this->checkGroupProperties($group);
$this->checkClasses($group);
}
/**
* @param $group
*/
protected function checkClasses($group): void
{
$this->assertInstanceOf(\Syntax\SteamApi\Containers\Group::class, $group);
$this->assertInstanceOf(\Syntax\SteamApi\Containers\Group\Details::class, $group->groupDetails);
$this->assertInstanceOf(\Syntax\SteamApi\Containers\Group\MemberDetails::class, $group->memberDetails);
$this->assertInstanceOf(\Illuminate\Support\Collection::class, $group->members);
}
}