mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
tests: add projects channel assertions
This commit is contained in:
@@ -587,7 +587,8 @@ class Functions extends Action
|
||||
$target = Realtime::fromPayload(
|
||||
// Pass first, most verbose event pattern
|
||||
event: $allEvents[0],
|
||||
payload: $execution
|
||||
payload: $execution,
|
||||
project: $project
|
||||
);
|
||||
Realtime::send(
|
||||
projectId: 'console',
|
||||
|
||||
@@ -1340,8 +1340,9 @@ class RealtimeCustomClientTest extends Scope
|
||||
$this->assertEquals('event', $response['type']);
|
||||
$this->assertNotEmpty($response['data']);
|
||||
$this->assertArrayHasKey('timestamp', $response['data']);
|
||||
$this->assertCount(4, $response['data']['channels']);
|
||||
$this->assertCount(5, $response['data']['channels']);
|
||||
$this->assertContains('console', $response['data']['channels']);
|
||||
$this->assertContains("projects.{$this->getProject()['$id']}", $response['data']['channels']);
|
||||
$this->assertContains('executions', $response['data']['channels']);
|
||||
$this->assertContains("executions.{$executionId}", $response['data']['channels']);
|
||||
$this->assertContains("functions.{$functionId}", $response['data']['channels']);
|
||||
@@ -1362,8 +1363,9 @@ class RealtimeCustomClientTest extends Scope
|
||||
$this->assertEquals('event', $responseUpdate['type']);
|
||||
$this->assertNotEmpty($responseUpdate['data']);
|
||||
$this->assertArrayHasKey('timestamp', $responseUpdate['data']);
|
||||
$this->assertCount(4, $responseUpdate['data']['channels']);
|
||||
$this->assertCount(5, $responseUpdate['data']['channels']);
|
||||
$this->assertContains('console', $responseUpdate['data']['channels']);
|
||||
$this->assertContains("projects.{$this->getProject()['$id']}", $response['data']['channels']);
|
||||
$this->assertContains('executions', $responseUpdate['data']['channels']);
|
||||
$this->assertContains("executions.{$executionId}", $responseUpdate['data']['channels']);
|
||||
$this->assertContains("functions.{$functionId}", $responseUpdate['data']['channels']);
|
||||
|
||||
Reference in New Issue
Block a user