@@ -140,4 +140,34 @@ function it_should_update_user_description(Client $guzzleClient, Response $respo
140140 $ guzzleClient ->send (new Request ('PUT ' , 'users?description=test ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
141141 $ this ->updateUser ('TEST_TOKEN ' , 'test ' )->shouldBeAnInstanceOf (ResponseInterface::class);
142142 }
143+
144+ function it_should_get_user_block_list (Client $ guzzleClient , Response $ response )
145+ {
146+ $ guzzleClient ->send (new Request ('GET ' , 'users/blocks?broadcaster_id=123 ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
147+ $ this ->getUserBlockList ('TEST_TOKEN ' , '123 ' )->shouldBeAnInstanceOf (ResponseInterface::class);
148+ }
149+
150+ function it_should_get_user_block_list_with_opts (Client $ guzzleClient , Response $ response )
151+ {
152+ $ guzzleClient ->send (new Request ('GET ' , 'users/blocks?broadcaster_id=123&first=100&after=abc ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
153+ $ this ->getUserBlockList ('TEST_TOKEN ' , '123 ' , 100 , 'abc ' )->shouldBeAnInstanceOf (ResponseInterface::class);
154+ }
155+
156+ function it_should_block_user (Client $ guzzleClient , Response $ response )
157+ {
158+ $ guzzleClient ->send (new Request ('PUT ' , 'users/blocks?target_user_id=123 ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
159+ $ this ->blockUser ('TEST_TOKEN ' , '123 ' )->shouldBeAnInstanceOf (ResponseInterface::class);
160+ }
161+
162+ function it_should_block_user_with_opts (Client $ guzzleClient , Response $ response )
163+ {
164+ $ guzzleClient ->send (new Request ('PUT ' , 'users/blocks?target_user_id=123&source_context=chat&reason=spam ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
165+ $ this ->blockUser ('TEST_TOKEN ' , '123 ' , 'chat ' , 'spam ' )->shouldBeAnInstanceOf (ResponseInterface::class);
166+ }
167+
168+ function it_should_unblock_user (Client $ guzzleClient , Response $ response )
169+ {
170+ $ guzzleClient ->send (new Request ('DELETE ' , 'users/blocks?target_user_id=123 ' , ['Authorization ' => 'Bearer TEST_TOKEN ' ]))->willReturn ($ response );
171+ $ this ->unblockUser ('TEST_TOKEN ' , '123 ' )->shouldBeAnInstanceOf (ResponseInterface::class);
172+ }
143173}
0 commit comments