Skip to content

Commit

Permalink
Fixes array access for first and last.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Feb 18, 2023
1 parent eb2dda4 commit 4fb15df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Http/Middleware/MiddlewareDeclarationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fb15df

Please sign in to comment.