@@ -18,7 +18,7 @@ abstract class TestCase extends Orchestra
1818 /**
1919 * Flush the database after each test function
2020 */
21- public function tearDown ()
21+ public function tearDown (): void
2222 {
2323 User::truncate ();
2424 Admin::truncate ();
@@ -44,7 +44,7 @@ public function tearDown()
4444 /** @var \Maklad\Permission\Models\Permission */
4545 protected $ testAdminPermission ;
4646
47- public function setUp ()
47+ public function setUp (): void
4848 {
4949 parent ::setUp ();
5050
@@ -103,7 +103,7 @@ protected function getEnvironmentSetUp($app)
103103 // Use test User model for users provider
104104 $ app ['config ' ]->set ('auth.providers.users.model ' , User::class);
105105
106- $ app ['log ' ]->getMonolog ()->pushHandler (new TestHandler ());
106+ $ app ['log ' ]->getLogger ()->pushHandler (new TestHandler ());
107107 }
108108
109109 /**
@@ -157,7 +157,7 @@ public function refreshTestAdmin()
157157
158158 protected function clearLogTestHandler ()
159159 {
160- \collect ($ this ->app ['log ' ]->getMonolog ()->getHandlers ())->filter (function ($ handler ) {
160+ \collect ($ this ->app ['log ' ]->getLogger ()->getHandlers ())->filter (function ($ handler ) {
161161 return $ handler instanceof TestHandler;
162162 })->first ()->clear ();
163163 }
@@ -180,7 +180,7 @@ protected function assertLogged($message, $level)
180180 */
181181 protected function hasLog ($ message , $ level )
182182 {
183- return \collect ($ this ->app ['log ' ]->getMonolog ()->getHandlers ())->filter (function ($ handler ) use (
183+ return \collect ($ this ->app ['log ' ]->getLogger ()->getHandlers ())->filter (function ($ handler ) use (
184184 $ message ,
185185 $ level
186186 ) {
@@ -208,7 +208,7 @@ protected function assertShowPermission($message, $role_permission)
208208 if (\config ('permission.display_permission_in_exception ' )) {
209209 $ this ->assertContains ($ role_permission , $ message );
210210 } else {
211- $ this ->assertNotContains ($ role_permission , $ message );
211+ $ this ->assertStringNotContainsString ($ role_permission , $ message );
212212 }
213213 }
214214
0 commit comments