change test validations from strings to datetime
This commit is contained in:
parent
fc39281bdb
commit
7ab26e5b0d
2 changed files with 4 additions and 4 deletions
|
@ -861,7 +861,7 @@ trait WebhooksBase
|
||||||
$this->assertNotEmpty($webhook['data']['userId']);
|
$this->assertNotEmpty($webhook['data']['userId']);
|
||||||
$this->assertNotEmpty($webhook['data']['teamId']);
|
$this->assertNotEmpty($webhook['data']['teamId']);
|
||||||
$this->assertCount(2, $webhook['data']['roles']);
|
$this->assertCount(2, $webhook['data']['roles']);
|
||||||
$this->assertEquals(false, DateTime::isValid($webhook['data']['joined']));
|
$this->assertEquals(true, DateTime::isValid($webhook['data']['joined']));
|
||||||
$this->assertEquals(true, DateTime::isValid($webhook['data']['invited']));
|
$this->assertEquals(true, DateTime::isValid($webhook['data']['invited']));
|
||||||
$this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']);
|
$this->assertEquals(('server' === $this->getSide()), $webhook['data']['confirm']);
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ class WebhooksCustomServerTest extends Scope
|
||||||
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
||||||
$this->assertNotEmpty($webhook['data']['$id']);
|
$this->assertNotEmpty($webhook['data']['$id']);
|
||||||
$this->assertEquals($webhook['data']['name'], $name);
|
$this->assertEquals($webhook['data']['name'], $name);
|
||||||
$this->assertEquals(true, DateTime::isValid($webhook['body']['registration']));
|
$this->assertEquals(true, DateTime::isValid($webhook['data']['registration']));
|
||||||
$this->assertEquals($webhook['data']['status'], true);
|
$this->assertEquals($webhook['data']['status'], true);
|
||||||
$this->assertEquals($webhook['data']['email'], $email);
|
$this->assertEquals($webhook['data']['email'], $email);
|
||||||
$this->assertEquals($webhook['data']['emailVerification'], false);
|
$this->assertEquals($webhook['data']['emailVerification'], false);
|
||||||
|
@ -333,7 +333,7 @@ class WebhooksCustomServerTest extends Scope
|
||||||
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
||||||
$this->assertNotEmpty($webhook['data']['$id']);
|
$this->assertNotEmpty($webhook['data']['$id']);
|
||||||
$this->assertEquals($webhook['data']['name'], $data['name']);
|
$this->assertEquals($webhook['data']['name'], $data['name']);
|
||||||
$this->assertEquals(true, DateTime::isValid($webhook['body']['registration']));
|
$this->assertEquals(true, DateTime::isValid($webhook['data']['registration']));
|
||||||
$this->assertEquals($webhook['data']['status'], false);
|
$this->assertEquals($webhook['data']['status'], false);
|
||||||
$this->assertEquals($webhook['data']['email'], $data['email']);
|
$this->assertEquals($webhook['data']['email'], $data['email']);
|
||||||
$this->assertEquals($webhook['data']['emailVerification'], false);
|
$this->assertEquals($webhook['data']['emailVerification'], false);
|
||||||
|
@ -375,7 +375,7 @@ class WebhooksCustomServerTest extends Scope
|
||||||
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
$this->assertEquals(empty($webhook['headers']['X-Appwrite-Webhook-User-Id'] ?? ''), ('server' === $this->getSide()));
|
||||||
$this->assertNotEmpty($webhook['data']['$id']);
|
$this->assertNotEmpty($webhook['data']['$id']);
|
||||||
$this->assertEquals($webhook['data']['name'], $data['name']);
|
$this->assertEquals($webhook['data']['name'], $data['name']);
|
||||||
$this->assertEquals(true, DateTime::isValid($webhook['body']['registration']));
|
$this->assertEquals(true, DateTime::isValid($webhook['data']['registration']));
|
||||||
$this->assertEquals($webhook['data']['status'], false);
|
$this->assertEquals($webhook['data']['status'], false);
|
||||||
$this->assertEquals($webhook['data']['email'], $data['email']);
|
$this->assertEquals($webhook['data']['email'], $data['email']);
|
||||||
$this->assertEquals($webhook['data']['emailVerification'], false);
|
$this->assertEquals($webhook['data']['emailVerification'], false);
|
||||||
|
|
Loading…
Reference in a new issue