diff --git a/tests/e2e/Services/GraphQL/AccountTest.php b/tests/e2e/Services/GraphQL/AccountTest.php index 3985988d78..0019aa9e6c 100644 --- a/tests/e2e/Services/GraphQL/AccountTest.php +++ b/tests/e2e/Services/GraphQL/AccountTest.php @@ -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']); diff --git a/tests/e2e/Services/GraphQL/BatchTest.php b/tests/e2e/Services/GraphQL/BatchTest.php index 7082d23677..85fcc86f18 100644 --- a/tests/e2e/Services/GraphQL/BatchTest.php +++ b/tests/e2e/Services/GraphQL/BatchTest.php @@ -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']);