Skip to content

Commit

Permalink
[tests]: Replace arrow function by normal definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsmania committed Apr 20, 2024
1 parent cc65b6a commit 3028c46
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/Menu/GateFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function testCanProperty()
{
// Define some Gate rules.

Gate::define('show-about', fn () => true);
Gate::define('show-home', fn () => false);
Gate::define('show-about', function () {return true;});
Gate::define('show-home', function () {return false;});

// Create the menu.

Expand All @@ -40,7 +40,7 @@ public function testCanPropertyWithOneRestrictedItem()
{
// Define some Gate rules.

Gate::define('show-home', fn () => false);
Gate::define('show-home', function () {return false;});

// Create the menu.

Expand All @@ -59,8 +59,8 @@ public function testCanPropertyWithInvalidValues()
{
// Define some Gate rules.

Gate::define('show-about', fn () => true);
Gate::define('show-home', fn () => false);
Gate::define('show-about', function () {return true;});
Gate::define('show-home', function () {return false;});

// Create the menu.

Expand Down Expand Up @@ -88,9 +88,9 @@ public function testCanPropertyWithMultipleValues()
{
// Define some Gate rules.

Gate::define('show-users', fn () => true);
Gate::define('edit-user', fn () => false);
Gate::define('show-settings', fn () => false);
Gate::define('show-users', function () {return true;});
Gate::define('edit-user', function () {return false;});
Gate::define('show-settings', function () {return false;});

// Create the menu.

Expand Down Expand Up @@ -119,8 +119,8 @@ public function testCanPropertyOnHeaders()
{
// Define some Gate rules.

Gate::define('show-header', fn () => true);
Gate::define('show-settings', fn () => false);
Gate::define('show-header', function () {return true;});
Gate::define('show-settings', function () {return false;});

// Create the menu.

Expand All @@ -141,8 +141,8 @@ public function testCanPropertyOnSubmenu()
{
// Define some Gate rules.

Gate::define('show-about', fn () => true);
Gate::define('show-home', fn () => false);
Gate::define('show-about', function () {return true;});
Gate::define('show-home', function () {return false;});

// Create the menu.

Expand Down Expand Up @@ -177,8 +177,8 @@ public function testCanPropertyOnWholeRestrictedSubmenu()
{
// Define some Gate rules.

Gate::define('show-about', fn () => false);
Gate::define('show-home', fn () => false);
Gate::define('show-about', function () {return false;});
Gate::define('show-home', function () {return false;});

// Create the menu.

Expand Down

0 comments on commit 3028c46

Please sign in to comment.