diff --git a/tests/Feature/App/Http/Controllers/Bo/DiscountsControllerTest.php b/tests/Feature/App/Http/Controllers/Bo/DiscountsControllerTest.php index 838898fa..32bbd1ea 100644 --- a/tests/Feature/App/Http/Controllers/Bo/DiscountsControllerTest.php +++ b/tests/Feature/App/Http/Controllers/Bo/DiscountsControllerTest.php @@ -100,6 +100,7 @@ describe('DiscountsController', function () { describe('authorization rejections', function () { it('redirects unauthenticated guest to login', function () { + /** @var \Tests\TestCase $this */ auth('backend')->logout(); $response = $this->get('/bo/discounts'); @@ -107,6 +108,8 @@ describe('DiscountsController', function () { }); it('redirects frontend customer trying to access bo to login', function () { + /** @var \Tests\TestCase $this */ + auth('backend')->logout(); $customer = new Customer(); $this->actingAs($customer, 'frontend'); diff --git a/tests/Feature/App/Http/Controllers/Bo/ProductsControllerTest.php b/tests/Feature/App/Http/Controllers/Bo/ProductsControllerTest.php index 96a38eea..b6c8b661 100644 --- a/tests/Feature/App/Http/Controllers/Bo/ProductsControllerTest.php +++ b/tests/Feature/App/Http/Controllers/Bo/ProductsControllerTest.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use App\Models\Customer; use App\Models\Product; use App\Models\Range; use App\Models\Tag; @@ -18,6 +19,7 @@ describe('ProductsController', function () { beforeEach(function () { // GIVEN + /** @var \Tests\TestCase $this */ $this->user = User::factory()->create(['role' => UserRole::SuperAdmin]); $this->actingAs($this->user, 'backend'); }); @@ -235,6 +237,7 @@ describe('ProductsController', function () { describe('authorization rejections', function () { it('redirects unauthenticated guest to login', function () { + /** @var \Tests\TestCase $this */ auth('backend')->logout(); $response = $this->get('/bo/products'); @@ -242,7 +245,9 @@ describe('ProductsController', function () { }); it('redirects frontend customer trying to access bo to login', function () { - $customer = new \Customer(); + /** @var \Tests\TestCase $this */ + auth('backend')->logout(); + $customer = new Customer(); $this->actingAs($customer, 'frontend'); $response = $this->get('/bo/products');