Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rigonlucas committed Aug 28, 2024
1 parent 8cfed98 commit 0845b67
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\Account;
namespace Tests\Unit\Entities\Account;

use Core\Application\Account\Commons\Exceptions\AccountNameInvalidException;
use Core\Domain\Entities\Account\AccountEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\Account;
namespace Tests\Unit\Entities\Account;

use Core\Application\Account\Commons\Exceptions\AccountJoinCodeInvalidException;
use Core\Domain\Entities\Account\AccountJoinCodeEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\Project;
namespace Tests\Unit\Entities\Project;

use Core\Domain\Entities\Account\AccountEntity;
use Core\Domain\Entities\Project\ProjectEntity;
Expand Down Expand Up @@ -104,41 +104,41 @@ public function test_create_project_fail_with_date_start_at_equal_finished_at()
{
$this->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()
);
}

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()
);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\User\Entity;
namespace Tests\Unit\Entities\User;

use Core\Domain\Entities\User\UserEntity;
use Core\Support\Exceptions\InvalideRules\InvalidRoleException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\User\Entity;
namespace Tests\Unit\Entities\User;

use Core\Domain\Entities\Account\AccountEntity;
use Core\Domain\Entities\User\UserEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Tests\Unit\User\Entity;
namespace Tests\Unit\Entities\User;

use Core\Domain\Entities\User\UserEntity;
use Core\Support\Exceptions\Access\ForbidenException;
Expand Down

0 comments on commit 0845b67

Please sign in to comment.