added messaging base test
This commit is contained in:
parent
048e8e81ba
commit
5960666068
2 changed files with 20 additions and 10 deletions
|
@ -3,15 +3,9 @@
|
|||
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
|
||||
{
|
||||
$providersParams = [
|
||||
|
@ -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']);
|
15
tests/e2e/Services/Messaging/MessagingCustomServerTest.php
Normal file
15
tests/e2e/Services/Messaging/MessagingCustomServerTest.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Messaging;
|
||||
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
|
||||
class MessagingCustomServerTest extends Scope
|
||||
{
|
||||
use MessagingBase;
|
||||
use ProjectCustom;
|
||||
use SideServer;
|
||||
|
||||
}
|
Loading…
Reference in a new issue