55use Maklad \Permission \Exceptions \GuardDoesNotMatch ;
66use Maklad \Permission \Exceptions \RoleDoesNotExist ;
77use Maklad \Permission \Models \Role ;
8+ use Monolog \Level ;
89use Monolog \Logger ;
910
1011class HasRolesTest extends TestCase
@@ -73,7 +74,7 @@ public function it_throws_an_exception_when_assigning_a_role_that_does_not_exist
7374 $ this ->testUser ->assignRole ('evil-emperor ' );
7475 } finally {
7576 $ message = $ this ->helpers ->getRoleDoesNotExistMessage ('evil-emperor ' , 'web ' );
76- $ this ->assertLogMessage ($ message , Logger:: ALERT );
77+ $ this ->assertLogMessage ($ message , Level::Alert );
7778 }
7879 }
7980 }
@@ -92,7 +93,7 @@ public function it_can_only_assign_roles_from_the_correct_guard()
9293 $ this ->testUser ->assignRole ('testAdminRole ' );
9394 } finally {
9495 $ message = $ this ->helpers ->getRoleDoesNotExistMessage ('testAdminRole ' , 'web ' );
95- $ this ->assertLogMessage ($ message , Logger:: ALERT );
96+ $ this ->assertLogMessage ($ message , Level::Alert );
9697 }
9798 }
9899 }
@@ -111,7 +112,7 @@ public function it_throws_an_exception_when_assigning_a_role_from_a_different_gu
111112 $ this ->testUser ->assignRole ($ this ->testAdminRole );
112113 } finally {
113114 $ message = $ this ->helpers ->getGuardDoesNotMatchMessage (collect (['web ' ]), 'admin ' );
114- $ this ->assertLogMessage ($ message , Logger:: ALERT );
115+ $ this ->assertLogMessage ($ message , Level::Alert );
115116 }
116117 }
117118 }
@@ -176,7 +177,7 @@ public function it_throws_an_exception_when_syncing_a_role_from_another_guard()
176177 $ this ->testUser ->syncRoles ('testRole ' , $ this ->testAdminRole );
177178 } finally {
178179 $ message = $ this ->helpers ->getGuardDoesNotMatchMessage (collect (['web ' ]), 'admin ' );
179- $ this ->assertLogMessage ($ message , Logger:: ALERT );
180+ $ this ->assertLogMessage ($ message , Level::Alert );
180181 }
181182 }
182183 }
0 commit comments