1
0
Fork 0
mirror of synced 2024-07-05 06:31:08 +12:00
appwrite/tests/e2e/Services/Teams/TeamsBaseServer.php

33 lines
781 B
PHP
Raw Normal View History

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