Skip to content

Commit 5147f35

Browse files
committed
Check getAll behaviour for resellers.
1 parent 0ec7b14 commit 5147f35

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/ResellerTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,26 @@ public function testGet()
3636
static::$_client->reseller()->delete('id', $reseller->id);
3737
}
3838

39+
public function testGetAll()
40+
{
41+
static::$_client->reseller()->create([
42+
'pname' => 'John Reseller',
43+
'login' => 'reseller-a',
44+
'passwd' => 'simple-password',
45+
]);
46+
static::$_client->reseller()->create([
47+
'pname' => 'Mike Reseller',
48+
'login' => 'reseller-b',
49+
'passwd' => 'simple-password',
50+
]);
51+
52+
$resellersInfo = static::$_client->reseller()->getAll();
53+
$this->assertCount(2, $resellersInfo);
54+
$this->assertEquals('John Reseller', $resellersInfo[0]->personalName);
55+
$this->assertEquals('reseller-a', $resellersInfo[0]->login);
56+
57+
static::$_client->reseller()->delete('login', 'reseller-a');
58+
static::$_client->reseller()->delete('login', 'reseller-b');
59+
}
60+
3961
}

0 commit comments

Comments
 (0)