diff --git a/tests/Menu/GateFilterTest.php b/tests/Menu/GateFilterTest.php index e3a3abb9..74dea6c3 100644 --- a/tests/Menu/GateFilterTest.php +++ b/tests/Menu/GateFilterTest.php @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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.