File tree Expand file tree Collapse file tree
tests/Unit/BackgroundJobs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ protected function run($argument) : void {
9595 $ this ->initUserEnvironment ($ uid );
9696 $ this ->processFile ($ filePath );
9797 } catch (\Throwable $ ex ) {
98- $ this ->logger ->error ($ ex ->getMessage (), [$ ex ]);
98+ $ this ->logger ->error ($ ex ->getMessage (), [' exception ' => $ ex ]);
9999 } finally {
100100 $ this ->shutdownUserEnvironment ();
101101 }
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public function testCatchesExceptionAndResetsUserEnvironment() {
150150
151151 $ this ->logger ->expects ($ this ->once ())
152152 ->method ('error ' )
153- ->with ($ exception ->getMessage (), [$ exception ]);
153+ ->with ($ exception ->getMessage (), [' exception ' => $ exception ]);
154154
155155 // Make sure user-environment is reset after any exception
156156 // so the user should be set on beginning but should also
@@ -327,7 +327,7 @@ public function testThrowsNoUserException_OnNonExistingUser() {
327327 $ this ->logger ->expects ($ this ->once ())
328328 ->method ('error ' )
329329 ->with ($ this ->stringContains ('nonexistinguser ' ), $ this ->callback (function ($ subject ) {
330- return is_array ($ subject ) && ($ subject [0 ] instanceof NoUserException);
330+ return is_array ($ subject ) && ($ subject [' exception ' ] instanceof NoUserException);
331331 }));
332332
333333 $ processFileJob = new ProcessFileJob (
You can’t perform that action at this time.
0 commit comments