From 0845b67f3a2fa8c2219bae7d94bbef45a9c528bc Mon Sep 17 00:00:00 2001 From: rigonlucas Date: Tue, 27 Aug 2024 21:07:07 -0300 Subject: [PATCH] fix tests --- .../Account/AccountEntityTest.php | 2 +- .../Account/AccountJoinCodeEntityTest.php | 2 +- .../Project/ProjectEntityTest.php | 48 +++++++++---------- .../User}/UserEntityRolesTest.php | 2 +- .../User}/UserEntityTest.php | 2 +- .../UserValidationForSameAccountTest.php | 2 +- 6 files changed, 29 insertions(+), 29 deletions(-) rename tests/Unit/{ => Entities}/Account/AccountEntityTest.php (95%) rename tests/Unit/{ => Entities}/Account/AccountJoinCodeEntityTest.php (98%) rename tests/Unit/{ => Entities}/Project/ProjectEntityTest.php (80%) rename tests/Unit/{User/Entity => Entities/User}/UserEntityRolesTest.php (99%) rename tests/Unit/{User/Entity => Entities/User}/UserEntityTest.php (99%) rename tests/Unit/{User/Entity => Entities/User}/UserValidationForSameAccountTest.php (97%) diff --git a/tests/Unit/Account/AccountEntityTest.php b/tests/Unit/Entities/Account/AccountEntityTest.php similarity index 95% rename from tests/Unit/Account/AccountEntityTest.php rename to tests/Unit/Entities/Account/AccountEntityTest.php index 2721aca..5c2c3bd 100644 --- a/tests/Unit/Account/AccountEntityTest.php +++ b/tests/Unit/Entities/Account/AccountEntityTest.php @@ -1,6 +1,6 @@ expectException(DatesMustBeDifferntsException::class); ProjectEntity::forCreate( - 'Project Name', - 'Project Description', - UserEntity::forIdentify( - 1, - Uuid::uuid7(), - UserRoles::ADMIN, - 1 + name: 'Project Name', + description: 'Project Description', + user: UserEntity::forIdentify( + id: 1, + uuid: Uuid::uuid7(), + role: UserRoles::ADMIN, + accountId: 1 ), - AccountEntity::forIdentify( - 1 + account: AccountEntity::forIdentify( + id: 1 ), - Uuid::uuid7(), - now(), - now() + uuid: Uuid::uuid7(), + startAt: now(), + finishAt: now() ); } @@ -125,20 +125,20 @@ public function test_create_project_fail_with_date_start_at_before_now() { $this->expectException(DateMustBeInCurrentDayException::class); ProjectEntity::forCreate( - 'Project Name', - 'Project Description', - UserEntity::forIdentify( - 1, - Uuid::uuid7(), - UserRoles::ADMIN, - 1 + name: 'Project Name', + description: 'Project Description', + user: UserEntity::forIdentify( + id: 1, + uuid: Uuid::uuid7(), + role: UserRoles::ADMIN, + accountId: 1 ), - AccountEntity::forIdentify( + account: AccountEntity::forIdentify( 1 ), - Uuid::uuid7(), - now()->subDay(), - now() + uuid: Uuid::uuid7(), + startAt: now()->subDay(), + finishAt: now() ); } } diff --git a/tests/Unit/User/Entity/UserEntityRolesTest.php b/tests/Unit/Entities/User/UserEntityRolesTest.php similarity index 99% rename from tests/Unit/User/Entity/UserEntityRolesTest.php rename to tests/Unit/Entities/User/UserEntityRolesTest.php index 0d7fb32..46ab911 100644 --- a/tests/Unit/User/Entity/UserEntityRolesTest.php +++ b/tests/Unit/Entities/User/UserEntityRolesTest.php @@ -1,6 +1,6 @@