Skip to content

Commit

Permalink
Fix isGroupMembers, added tests for it
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Aug 13, 2014
1 parent 8ef985e commit 154813f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function isGroupMember($groupId, $id)
*/
public function isGroupMembers($groupId, array $ids)
{
return (boolean) $this->request('method/groups.isMember', array(
return $this->request('method/groups.isMember', array(
'group_id' => $groupId,
'user_ids' => $ids
));
Expand Down
13 changes: 13 additions & 0 deletions tests/VkTest/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ public function testIsGroupMemberSuccess()
$this->assertFalse($client->isGroupMember(10639516, 103061163)); //MDK
}

public function testIsGroupMembersSuccess()
{
$client = $this->getClient();

$result = $client->isGroupMembers(1, array(103061163, 1));
$this->assertEquals(0, $result[0]->member);
$this->assertEquals(1, $result[1]->member);

$result = $client->isGroupMembers(10639516, array(103061163, 1));
$this->assertEquals(0, $result[0]->member);
$this->assertEquals(0, $result[1]->member);
}

public function testGetFriends()
{
$client = $this->getClient();
Expand Down

0 comments on commit 154813f

Please sign in to comment.