diff --git a/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php b/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php index 56b8b2370..5b4d76c7f 100644 --- a/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php +++ b/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php @@ -5,9 +5,9 @@ use App\Containers\AppSection\Authentication\Actions\WebLoginAction; use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException; use App\Containers\AppSection\Authentication\Exceptions\UserNotConfirmedException; +use App\Containers\AppSection\Authentication\Tests\TestCase; use App\Containers\AppSection\Authentication\UI\WEB\Requests\LoginRequest; use App\Containers\AppSection\User\Models\User; -use App\Containers\AppSection\User\Tests\TestCase; use Illuminate\Support\Facades\Config; /** @@ -22,20 +22,6 @@ class WebLoginActionTest extends TestCase private LoginRequest $request; private mixed $action; - protected function setUp(): void - { - parent::setUp(); - $this->userDetails = [ - 'email' => 'Mahmoud@test.test', - 'password' => 'so-secret', - 'name' => 'Mahmoud', - ]; - $this->getTestingUser($this->userDetails); - $this->actingAs($this->testingUser, 'web'); - $this->request = new LoginRequest($this->userDetails); - $this->action = app(WebLoginAction::class); - } - public function testLogin(): void { $user = $this->action->run($this->request); @@ -67,4 +53,18 @@ public function testGivenEmailConfirmationIsRequiredAndUserIsNotConfirmedThrowsA Config::set('appSection-authentication.require_email_confirmation', $configInitialValue); } + + protected function setUp(): void + { + parent::setUp(); + $this->userDetails = [ + 'email' => 'Mahmoud@test.test', + 'password' => 'so-secret', + 'name' => 'Mahmoud', + ]; + $this->getTestingUser($this->userDetails); + $this->actingAs($this->testingUser, 'web'); + $this->request = new LoginRequest($this->userDetails); + $this->action = app(WebLoginAction::class); + } }