1 | <?php |
||
6 | class BaseTester extends TestCase { |
||
7 | |||
8 | protected $id32 = 'STEAM_1:1:31085444'; |
||
9 | |||
10 | protected $id64 = 76561198022436617; |
||
11 | |||
12 | protected $id3 = '[U:1:62170889]'; |
||
13 | |||
14 | protected $altId64 = 76561197979958413; |
||
15 | |||
16 | protected $appId = 620; |
||
17 | |||
18 | protected $groupId = 103582791429521412; |
||
19 | |||
20 | protected $groupName = 'Valve'; |
||
21 | |||
22 | protected $steamClient; |
||
23 | |||
24 | public function setUp() |
||
25 | { |
||
26 | parent::setUp(); |
||
27 | $this->steamClient = new Client(); |
||
28 | } |
||
29 | |||
30 | /** @test */ |
||
31 | public function empty_test() |
||
32 | { |
||
33 | } |
||
34 | |||
35 | protected function assertObjectHasAttributes($attributes, $object) |
||
36 | { |
||
37 | foreach ($attributes as $attribute) { |
||
38 | $this->assertObjectHasAttribute($attribute, $object); |
||
39 | } |
||
40 | } |
||
41 | |||
42 | protected function checkSteamIdsProperties($steamId) |
||
43 | { |
||
44 | $attributes = [ |
||
45 | 'id32', 'id64', 'id3', 'communityId', 'steamId' |
||
46 | ]; |
||
47 | $this->assertObjectHasAttributes($attributes, $steamId); |
||
48 | } |
||
49 | |||
50 | protected function checkPlayerProperties($friendsList) |
||
74 | |||
75 | protected function checkAchievementProperties($achievement) |
||
76 | { |
||
77 | $attributes = [ |
||
78 | 'apiName', 'achieved', 'name', 'description' |
||
79 | ]; |
||
80 | $this->assertObjectHasAttributes($attributes, $achievement); |
||
81 | } |
||
82 | |||
83 | protected function checkAppProperties($app) |
||
89 | |||
90 | protected function checkGroupProperties($group) |
||
97 | |||
98 | /** |
||
99 | * @param $app |
||
100 | */ |
||
101 | private function checkMainAppProperties($app) |
||
108 | |||
109 | /** |
||
110 | * @param $app |
||
111 | */ |
||
112 | private function checkGeneralAppProperties($app) |
||
119 | |||
120 | /** |
||
121 | * @param $app |
||
122 | */ |
||
123 | private function checkNestedAppProperties($app) |
||
136 | |||
137 | /** |
||
138 | * @param $group |
||
139 | */ |
||
140 | private function checkGroupMainSummaryProperties($group) |
||
148 | |||
149 | /** |
||
150 | * @param $group |
||
151 | */ |
||
152 | private function checkGroupDetailProperties($group) |
||
165 | |||
166 | /** |
||
167 | * @param $group |
||
168 | */ |
||
169 | private function checkGroupMemberDetailsProperties($group) |
||
176 | |||
177 | /** |
||
178 | * @param $group |
||
179 | */ |
||
180 | private function checkGroupMemberProperties($group) |
||
188 | |||
189 | } |