test: fix gql tests
This commit is contained in:
parent
fda9df069a
commit
467f4eaa06
2 changed files with 21 additions and 14 deletions
|
@ -152,10 +152,11 @@ class AccountTest extends Scope
|
|||
],
|
||||
];
|
||||
|
||||
$token = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$token = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertArrayNotHasKey('errors', $token['body']);
|
||||
$this->assertIsArray($token['body']['data']);
|
||||
|
|
|
@ -89,10 +89,11 @@ class BatchTest extends Scope
|
|||
],
|
||||
]];
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertIsArray($response['body'][0]['data']);
|
||||
$this->assertIsArray($response['body'][1]['data']);
|
||||
|
@ -136,10 +137,11 @@ class BatchTest extends Scope
|
|||
],
|
||||
];
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertIsArray($response['body'][0]['data']);
|
||||
$this->assertIsArray($response['body'][1]['data']);
|
||||
|
@ -170,10 +172,11 @@ class BatchTest extends Scope
|
|||
]
|
||||
],
|
||||
];
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertIsArray($response['body'][0]['data']);
|
||||
$this->assertIsArray($response['body'][1]['data']);
|
||||
|
@ -211,10 +214,11 @@ class BatchTest extends Scope
|
|||
]
|
||||
],
|
||||
];
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertIsArray($response['body'][0]['data']);
|
||||
$this->assertIsArray($response['body'][1]['data']);
|
||||
|
@ -299,10 +303,11 @@ class BatchTest extends Scope
|
|||
],
|
||||
];
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
|
||||
$this->assertIsArray($response['body']['data']);
|
||||
|
@ -368,10 +373,11 @@ class BatchTest extends Scope
|
|||
],
|
||||
];
|
||||
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
|
||||
$response = $this->client->call(Client::METHOD_POST, '/graphql', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
'origin' => 'http://localhost',
|
||||
], $graphQLPayload);
|
||||
|
||||
$this->assertIsArray($response['body']['data']);
|
||||
$this->assertArrayNotHasKey('errors', $response['body']);
|
||||
|
|
Loading…
Reference in a new issue