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