1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00

Revert "test: fix gql tests"

This reverts commit 467f4eaa06.
This commit is contained in:
loks0n 2023-12-13 10:26:57 +00:00
parent 0e25d3e1df
commit d623d4dcf9
2 changed files with 14 additions and 21 deletions

View file

@ -152,11 +152,10 @@ class AccountTest extends Scope
],
];
$token = $this->client->call(Client::METHOD_POST, '/graphql', [
$token = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertArrayNotHasKey('errors', $token['body']);
$this->assertIsArray($token['body']['data']);

View file

@ -89,11 +89,10 @@ class BatchTest extends Scope
],
]];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body'][0]['data']);
$this->assertIsArray($response['body'][1]['data']);
@ -137,11 +136,10 @@ class BatchTest extends Scope
],
];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body'][0]['data']);
$this->assertIsArray($response['body'][1]['data']);
@ -172,11 +170,10 @@ class BatchTest extends Scope
]
],
];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body'][0]['data']);
$this->assertIsArray($response['body'][1]['data']);
@ -214,11 +211,10 @@ class BatchTest extends Scope
]
],
];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body'][0]['data']);
$this->assertIsArray($response['body'][1]['data']);
@ -303,11 +299,10 @@ class BatchTest extends Scope
],
];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body']['data']);
@ -373,11 +368,10 @@ class BatchTest extends Scope
],
];
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'origin' => 'http://localhost',
], $graphQLPayload);
], $this->getHeaders()), $graphQLPayload);
$this->assertIsArray($response['body']['data']);
$this->assertArrayNotHasKey('errors', $response['body']);