From 99ae69bdc3a4122d2f21665c6cdeac88ae4eae31 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Fri, 5 Jun 2026 19:44:00 +0530 Subject: [PATCH] test: assert exact values for email metadata fields in account and user tests --- tests/e2e/Services/Account/AccountBase.php | 10 +++++----- tests/e2e/Services/Users/UsersBase.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php index c752a3bd5a..0f55f9dc0d 100644 --- a/tests/e2e/Services/Account/AccountBase.php +++ b/tests/e2e/Services/Account/AccountBase.php @@ -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 diff --git a/tests/e2e/Services/Users/UsersBase.php b/tests/e2e/Services/Users/UsersBase.php index 828476ac07..eeadbfa925 100644 --- a/tests/e2e/Services/Users/UsersBase.php +++ b/tests/e2e/Services/Users/UsersBase.php @@ -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