diff --git a/tests/e2e/Services/Messaging/MessagingServerTest.php b/tests/e2e/Services/Messaging/MessagingBase.php similarity index 95% rename from tests/e2e/Services/Messaging/MessagingServerTest.php rename to tests/e2e/Services/Messaging/MessagingBase.php index 74855bc4a6..8a0937c0eb 100644 --- a/tests/e2e/Services/Messaging/MessagingServerTest.php +++ b/tests/e2e/Services/Messaging/MessagingBase.php @@ -3,16 +3,10 @@ namespace Tests\E2E\Services\Messaging; use Tests\E2E\Client; -use Tests\E2E\Scopes\ProjectCustom; -use Tests\E2E\Scopes\Scope; -use Tests\E2E\Scopes\SideServer; -class MessagingServerTest extends Scope +trait MessagingBase { - use ProjectCustom; - use SideServer; - - public function testCreateProviders(): array + public function testCreateProviders(): array { $providersParams = [ 'sendgrid' => [ @@ -77,7 +71,8 @@ class MessagingServerTest extends Scope $response = $this->client->call(Client::METHOD_POST, '/messaging/providers/' . $key, \array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ],$this->getHeaders()), $providersParams[$key]); + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]), $providersParams[$key]); \array_push($providers, $response['body']); $this->assertEquals(201, $response['headers']['status-code']); $this->assertEquals($providersParams[$key]['name'], $response['body']['name']); @@ -195,4 +190,4 @@ class MessagingServerTest extends Scope $this->assertEquals(204, $response['headers']['status-code']); } } -} +} \ No newline at end of file diff --git a/tests/e2e/Services/Messaging/MessagingCustomServerTest.php b/tests/e2e/Services/Messaging/MessagingCustomServerTest.php new file mode 100644 index 0000000000..c126df3261 --- /dev/null +++ b/tests/e2e/Services/Messaging/MessagingCustomServerTest.php @@ -0,0 +1,15 @@ +