From e7ee035a75419c68179f33bd6cbf5435e1ebf0a0 Mon Sep 17 00:00:00 2001 From: Diego Smania Date: Sat, 20 Apr 2024 18:14:17 -0300 Subject: [PATCH] [tests]: Fix CI --- tests/Menu/GateFilterTest.php | 56 ++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/tests/Menu/GateFilterTest.php b/tests/Menu/GateFilterTest.php index 74dea6c3..575334d6 100644 --- a/tests/Menu/GateFilterTest.php +++ b/tests/Menu/GateFilterTest.php @@ -18,8 +18,12 @@ public function testCanProperty() { // Define some Gate rules. - Gate::define('show-about', function () {return true;}); - Gate::define('show-home', function () {return false;}); + Gate::define('show-about', function () { + return true; + }); + Gate::define('show-home', function () { + return false; + }); // Create the menu. @@ -40,7 +44,9 @@ public function testCanPropertyWithOneRestrictedItem() { // Define some Gate rules. - Gate::define('show-home', function () {return false;}); + Gate::define('show-home', function () { + return false; + }); // Create the menu. @@ -59,8 +65,12 @@ public function testCanPropertyWithInvalidValues() { // Define some Gate rules. - Gate::define('show-about', function () {return true;}); - Gate::define('show-home', function () {return false;}); + Gate::define('show-about', function () { + return true; + }); + Gate::define('show-home', function () { + return false; + }); // Create the menu. @@ -88,9 +98,15 @@ public function testCanPropertyWithMultipleValues() { // Define some Gate rules. - Gate::define('show-users', function () {return true;}); - Gate::define('edit-user', function () {return false;}); - Gate::define('show-settings', function () {return 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 +135,12 @@ public function testCanPropertyOnHeaders() { // Define some Gate rules. - Gate::define('show-header', function () {return true;}); - Gate::define('show-settings', function () {return false;}); + Gate::define('show-header', function () { + return true; + }); + Gate::define('show-settings', function () { + return false; + }); // Create the menu. @@ -141,8 +161,12 @@ public function testCanPropertyOnSubmenu() { // Define some Gate rules. - Gate::define('show-about', function () {return true;}); - Gate::define('show-home', function () {return false;}); + Gate::define('show-about', function () { + return true; + }); + Gate::define('show-home', function () { + return false; + }); // Create the menu. @@ -177,8 +201,12 @@ public function testCanPropertyOnWholeRestrictedSubmenu() { // Define some Gate rules. - Gate::define('show-about', function () {return false;}); - Gate::define('show-home', function () {return false;}); + Gate::define('show-about', function () { + return false; + }); + Gate::define('show-home', function () { + return false; + }); // Create the menu.