mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Updated tests
This commit is contained in:
@@ -211,7 +211,7 @@ class Client
|
||||
}
|
||||
|
||||
$responseBody = curl_exec($ch);
|
||||
$responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : '';
|
||||
$responseType = $responseHeaders['content-type'] ?? '';
|
||||
$responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
switch (substr($responseType, 0, strpos($responseType, ';'))) {
|
||||
|
||||
@@ -65,8 +65,8 @@ trait AccountBase
|
||||
public function testCreateAccountSession($data):array
|
||||
{
|
||||
sleep(10);
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$password = (isset($data['password'])) ? $data['password'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$password = $data['password'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -132,9 +132,9 @@ trait AccountBase
|
||||
*/
|
||||
public function testGetAccount($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$name = (isset($data['name'])) ? $data['name'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$name = $data['name'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -183,7 +183,7 @@ trait AccountBase
|
||||
*/
|
||||
public function testGetAccountPrefs($data):array
|
||||
{
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -219,8 +219,8 @@ trait AccountBase
|
||||
*/
|
||||
public function testGetAccountSessions($data):array
|
||||
{
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$sessionId = (isset($data['sessionId'])) ? $data['sessionId'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
$sessionId = $data['sessionId'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -281,7 +281,7 @@ trait AccountBase
|
||||
public function testGetAccountLogs($data):array
|
||||
{
|
||||
sleep(10);
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -369,8 +369,8 @@ trait AccountBase
|
||||
*/
|
||||
public function testUpdateAccountName($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
$newName = 'New Name';
|
||||
|
||||
/**
|
||||
@@ -436,9 +436,9 @@ trait AccountBase
|
||||
*/
|
||||
public function testUpdateAccountPassword($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$password = (isset($data['password'])) ? $data['password'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$password = $data['password'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -505,7 +505,7 @@ trait AccountBase
|
||||
public function testUpdateAccountEmail($data):array
|
||||
{
|
||||
$newEmail = uniqid().'new@localhost.test';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -561,7 +561,7 @@ trait AccountBase
|
||||
public function testUpdateAccountPrefs($data):array
|
||||
{
|
||||
$newEmail = uniqid().'new@localhost.test';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -638,9 +638,9 @@ trait AccountBase
|
||||
*/
|
||||
public function testCreateAccountVerification($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$name = (isset($data['name'])) ? $data['name'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$name = $data['name'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -703,9 +703,9 @@ trait AccountBase
|
||||
*/
|
||||
public function testUpdateAccountVerification($data):array
|
||||
{
|
||||
$id = (isset($data['id'])) ? $data['id'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$verification = (isset($data['verification'])) ? $data['verification'] : '';
|
||||
$id = $data['id'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
$verification = $data['verification'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -757,9 +757,9 @@ trait AccountBase
|
||||
*/
|
||||
public function testDeleteAccountSession($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$password = (isset($data['password'])) ? $data['password'] : '';
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$password = $data['password'] ?? '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -825,8 +825,8 @@ trait AccountBase
|
||||
*/
|
||||
public function testDeleteAccountSessionCurrent($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$password = (isset($data['password'])) ? $data['password'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$password = $data['password'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -882,7 +882,7 @@ trait AccountBase
|
||||
*/
|
||||
public function testDeleteAccountSessions($data):array
|
||||
{
|
||||
$session = (isset($data['session'])) ? $data['session'] : '';
|
||||
$session = $data['session'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -910,8 +910,8 @@ trait AccountBase
|
||||
/**
|
||||
* Create new fallback session
|
||||
*/
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$password = (isset($data['password'])) ? $data['password'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$password = $data['password'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([
|
||||
'origin' => 'http://localhost',
|
||||
@@ -932,8 +932,8 @@ trait AccountBase
|
||||
*/
|
||||
public function testCreateAccountRecovery($data):array
|
||||
{
|
||||
$email = (isset($data['email'])) ? $data['email'] : '';
|
||||
$name = (isset($data['name'])) ? $data['name'] : '';
|
||||
$email = $data['email'] ?? '';
|
||||
$name = $data['name'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -1006,8 +1006,8 @@ trait AccountBase
|
||||
*/
|
||||
public function testUpdateAccountRecovery($data):array
|
||||
{
|
||||
$id = (isset($data['id'])) ? $data['id'] : '';
|
||||
$recovery = (isset($data['recovery'])) ? $data['recovery'] : '';
|
||||
$id = $data['id'] ?? '';
|
||||
$recovery = $data['recovery'] ?? '';
|
||||
$newPassowrd = 'test-recovery';
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ trait FunctionsBase
|
||||
// */
|
||||
// public function testGetTeam($data):array
|
||||
// {
|
||||
// $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
// $id = $data['teamUid'] ?? '';
|
||||
|
||||
// /**
|
||||
// * Test for SUCCESS
|
||||
|
||||
@@ -38,7 +38,7 @@ class FunctionsConsoleServerTest extends Scope
|
||||
'timeout' => 10,
|
||||
]);
|
||||
|
||||
$functionId = (isset($response1['body']['$id'])) ? $response1['body']['$id'] : '';
|
||||
$functionId = $response1['body']['$id'] ?? '';
|
||||
|
||||
$this->assertEquals(201, $response1['headers']['status-code']);
|
||||
$this->assertNotEmpty($response1['body']['$id']);
|
||||
@@ -186,7 +186,7 @@ class FunctionsConsoleServerTest extends Scope
|
||||
'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php-fx.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'),
|
||||
]);
|
||||
|
||||
$tagId = (isset($tag['body']['$id'])) ? $tag['body']['$id'] : '';
|
||||
$tagId = $tag['body']['$id'] ?? '';
|
||||
|
||||
$this->assertEquals(201, $tag['headers']['status-code']);
|
||||
$this->assertNotEmpty($tag['body']['$id']);
|
||||
@@ -296,7 +296,7 @@ class FunctionsConsoleServerTest extends Scope
|
||||
'async' => 1,
|
||||
]);
|
||||
|
||||
$executionId = (isset($execution['body']['$id'])) ? $execution['body']['$id'] : '';
|
||||
$executionId = $execution['body']['$id'] ?? '';
|
||||
|
||||
$this->assertEquals(201, $execution['headers']['status-code']);
|
||||
$this->assertNotEmpty($execution['body']['$id']);
|
||||
|
||||
@@ -79,7 +79,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProject($data):array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -106,7 +106,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProject($data):array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -147,7 +147,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectUsage($data):array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -206,7 +206,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProject($data):array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -249,7 +249,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectOAuth($data):array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$providers = require('app/config/providers.php');
|
||||
|
||||
/**
|
||||
@@ -307,7 +307,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testCreateProjectWebhook($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -358,7 +358,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProjectWebhook($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -380,8 +380,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectWebhook($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$webhookId = $data['webhookId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -416,8 +416,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectWebhook($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$webhookId = $data['webhookId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -503,8 +503,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testDeleteProjectWebhook($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$webhookId = $data['webhookId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -541,7 +541,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testCreateProjectKey($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/keys', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -581,7 +581,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProjectKey($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -603,8 +603,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectKey($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$keyId = $data['keyId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -638,8 +638,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectKey($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$keyId = $data['keyId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/keys/'.$keyId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -693,8 +693,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testDeleteProjectKey($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$keyId = $data['keyId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/keys/'.$keyId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -731,7 +731,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testCreateProjectTask($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/tasks', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -859,7 +859,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProjectTask($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -881,8 +881,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectTask($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$taskId = $data['taskId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -921,8 +921,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectTask($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$taskId = $data['taskId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1087,8 +1087,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testDeleteProjectTask($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$taskId = $data['taskId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1125,7 +1125,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testCreateProjectPlatform($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1227,7 +1227,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProjectPlatform($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1249,9 +1249,9 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectPlatform($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
|
||||
$platformWebId = $data['platformWebId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1267,7 +1267,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertEquals('', $response['body']['store']);
|
||||
$this->assertEquals('localhost', $response['body']['hostname']);
|
||||
|
||||
$platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
|
||||
$platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1283,7 +1283,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertEquals('', $response['body']['store']);
|
||||
$this->assertEquals('', $response['body']['hostname']);
|
||||
|
||||
$platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
|
||||
$platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1317,9 +1317,9 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectPlatform($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
|
||||
$platformWebId = $data['platformWebId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1340,7 +1340,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertEquals('', $response['body']['store']);
|
||||
$this->assertEquals('localhost-new', $response['body']['hostname']);
|
||||
|
||||
$platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
|
||||
$platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1361,7 +1361,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
$this->assertEquals('', $response['body']['store']);
|
||||
$this->assertEquals('', $response['body']['hostname']);
|
||||
|
||||
$platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
|
||||
$platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1394,9 +1394,9 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testDeleteProjectPlatform($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
|
||||
$platformWebId = $data['platformWebId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1413,7 +1413,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
|
||||
$this->assertEquals(404, $response['headers']['status-code']);
|
||||
|
||||
$platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
|
||||
$platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1430,7 +1430,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
|
||||
$this->assertEquals(404, $response['headers']['status-code']);
|
||||
|
||||
$platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
|
||||
$platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1467,7 +1467,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testCreateProjectDomain($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/domains', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1506,7 +1506,7 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testListProjectDomain($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1528,8 +1528,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testGetProjectDomain($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$domainId = $data['domainId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/'.$domainId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1563,8 +1563,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testUpdateProjectDomain($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$domainId = $data['domainId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/domains/'.$domainId.'/verification', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
@@ -1585,8 +1585,8 @@ class ProjectsConsoleClientTest extends Scope
|
||||
*/
|
||||
public function testDeleteProjectDomain($data): array
|
||||
{
|
||||
$id = (isset($data['projectId'])) ? $data['projectId'] : '';
|
||||
$domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
|
||||
$id = $data['projectId'] ?? '';
|
||||
$domainId = $data['domainId'] ?? '';
|
||||
|
||||
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/domains/'.$domainId, array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
||||
@@ -75,7 +75,7 @@ trait TeamsBase
|
||||
*/
|
||||
public function testGetTeam($data):array
|
||||
{
|
||||
$id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$id = $data['teamUid'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
|
||||
@@ -11,7 +11,7 @@ trait TeamsBaseClient
|
||||
*/
|
||||
public function testGetTeamMemberships($data):array
|
||||
{
|
||||
$teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$teamUid = $data['teamUid'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -40,8 +40,8 @@ trait TeamsBaseClient
|
||||
*/
|
||||
public function testCreateTeamMembership($data):array
|
||||
{
|
||||
$teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
|
||||
$teamUid = $data['teamUid'] ?? '';
|
||||
$teamName = $data['teamName'] ?? '';
|
||||
$email = uniqid().'friend@localhost.test';
|
||||
|
||||
/**
|
||||
@@ -127,10 +127,10 @@ trait TeamsBaseClient
|
||||
*/
|
||||
public function testUpdateTeamMembership($data):array
|
||||
{
|
||||
$teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$secret = (isset($data['secret'])) ? $data['secret'] : '';
|
||||
$inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
|
||||
$userUid = (isset($data['userUid'])) ? $data['userUid'] : '';
|
||||
$teamUid = $data['teamUid'] ?? '';
|
||||
$secret = $data['secret'] ?? '';
|
||||
$inviteUid = $data['inviteUid'] ?? '';
|
||||
$userUid = $data['userUid'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -207,8 +207,8 @@ trait TeamsBaseClient
|
||||
*/
|
||||
public function testDeleteTeamMembership($data):array
|
||||
{
|
||||
$teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
|
||||
$teamUid = $data['teamUid'] ?? '';
|
||||
$inviteUid = $data['inviteUid'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
|
||||
@@ -11,7 +11,7 @@ trait TeamsBaseServer
|
||||
*/
|
||||
public function testGetTeamMemberships($data):array
|
||||
{
|
||||
$id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$id = $data['teamUid'] ?? '';
|
||||
|
||||
/**
|
||||
* Test for SUCCESS
|
||||
@@ -37,8 +37,8 @@ trait TeamsBaseServer
|
||||
*/
|
||||
public function testCreateTeamMembership($data):array
|
||||
{
|
||||
$teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
|
||||
$teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
|
||||
$teamUid = $data['teamUid'] ?? '';
|
||||
$teamName = $data['teamName'] ?? '';
|
||||
$email = uniqid().'friend@localhost.test';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user