1
0
Fork 0
mirror of synced 2024-07-01 12:40:34 +12:00
appwrite/tests/e2e/Services/Teams/TeamsBaseServer.php
2020-06-08 11:01:11 +03:00

33 lines
789 B
PHP

<?php
namespace Tests\E2E\Services\Teams;
use Tests\E2E\Client;
trait TeamsBaseServer
{
/**
* @depends testCreateTeam
*/
public function testGetTeamMemberships($data):array
{
$id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
/**
* Test for SUCCESS
*/
$response = $this->client->call(Client::METHOD_GET, '/teams/'.$id.'/memberships', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals(0, $response['body']['sum']);
/**
* Test for FAILURE
*/
return [];
}
}