From 4fb15df2db4aa990fc762ddd4f7ae1401d617c4c Mon Sep 17 00:00:00 2001 From: Italo Israel Baeza Cabrera Date: Sat, 18 Feb 2023 00:13:37 -0300 Subject: [PATCH] Fixes array access for first and last. --- tests/Http/Middleware/MiddlewareDeclarationTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Http/Middleware/MiddlewareDeclarationTest.php b/tests/Http/Middleware/MiddlewareDeclarationTest.php index 9505b36..89696bb 100644 --- a/tests/Http/Middleware/MiddlewareDeclarationTest.php +++ b/tests/Http/Middleware/MiddlewareDeclarationTest.php @@ -4,6 +4,7 @@ use Illuminate\Contracts\Http\Kernel; use Illuminate\Routing\Router; +use Illuminate\Support\Arr; use Laragear\Meta\Http\Middleware\MiddlewareDeclaration; use Laragear\Meta\Testing\InteractsWithServiceProvider; use Tests\TestCase; @@ -50,14 +51,14 @@ public function test_first(): void { $this->declaration->first(); - static::assertSame('foo', $this->app->make(Kernel::class)->getMiddlewarePriority()[0]); + static::assertSame('foo', Arr::first($this->app->make(Kernel::class)->getMiddlewarePriority())); } public function test_last(): void { $this->declaration->last(); - static::assertSame('foo', $this->app->make(Kernel::class)->getMiddlewarePriority()[9]); + static::assertSame('foo', Arr::last($this->app->make(Kernel::class)->getMiddlewarePriority())); } public function test_shared(): void