test: assert exact values for email metadata fields in account and user tests

This commit is contained in:
harsh mahajan committed 2026-06-05 20:27:58 +05:30
1 parent 62c52efdbc
commit 99ae69bdc3
2 files changed
+10 -10

No files matched your search

+5 -5
View File
@@ -43,11 +43,11 @@ trait AccountBase
$this->assertNotEmpty($response['body']['accessedAt']);
$this->assertArrayHasKey('targets', $response['body']);
$this->assertEquals($email, $response['body']['targets'][0]['identifier']);
$this->assertArrayHasKey('emailCanonical', $response['body']);
$this->assertArrayHasKey('emailIsFree', $response['body']);
$this->assertArrayHasKey('emailIsDisposable', $response['body']);
$this->assertArrayHasKey('emailIsCorporate', $response['body']);
$this->assertArrayHasKey('emailIsCanonical', $response['body']);
$this->assertEquals($email, $response['body']['emailCanonical']);
$this->assertEquals(false, $response['body']['emailIsFree']);
$this->assertEquals(false, $response['body']['emailIsDisposable']);
$this->assertEquals(true, $response['body']['emailIsCorporate']);
$this->assertEquals(true, $response['body']['emailIsCanonical']);
/**
* Test for FAILURE
+5 -5
View File
@@ -337,11 +337,11 @@ trait UsersBase
$this->assertEquals($body['status'], true);
$this->assertGreaterThan('2000-01-01 00:00:00', $body['registration']);
$this->assertEquals($body['labels'], []);
$this->assertArrayHasKey('emailCanonical', $body);
$this->assertArrayHasKey('emailIsFree', $body);
$this->assertArrayHasKey('emailIsDisposable', $body);
$this->assertArrayHasKey('emailIsCorporate', $body);
$this->assertArrayHasKey('emailIsCanonical', $body);
$this->assertEquals('cristiano.ronaldo@manchester-united.co.uk', $body['emailCanonical']);
$this->assertEquals(false, $body['emailIsFree']);
$this->assertEquals(false, $body['emailIsDisposable']);
$this->assertEquals(true, $body['emailIsCorporate']);
$this->assertEquals(true, $body['emailIsCanonical']);
/**
* Test Create with Custom ID for SUCCESS