@@ -35,7 +35,7 @@ public function testRegister()
3535 $ handler = ErrorHandler::register ();
3636
3737 try {
38- $ this ->assertInstanceOf (' Symfony\Component\Debug\ ErrorHandler' , $ handler );
38+ $ this ->assertInstanceOf (ErrorHandler::class , $ handler );
3939 $ this ->assertSame ($ handler , ErrorHandler::register ());
4040
4141 $ newHandler = new ErrorHandler ();
@@ -72,7 +72,7 @@ public function testRegister()
7272
7373 public function testErrorGetLast ()
7474 {
75- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
75+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
7676 $ handler = ErrorHandler::register ();
7777 $ handler ->setDefaultLogger ($ logger );
7878 $ handler ->screamAt (\E_ALL );
@@ -150,7 +150,7 @@ public function testConstruct()
150150 public function testDefaultLogger ()
151151 {
152152 try {
153- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
153+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
154154 $ handler = ErrorHandler::register ();
155155
156156 $ handler ->setDefaultLogger ($ logger , \E_NOTICE );
@@ -225,7 +225,7 @@ public function testHandleError()
225225 restore_error_handler ();
226226 restore_exception_handler ();
227227
228- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
228+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
229229
230230 $ warnArgCheck = function ($ logLevel , $ message , $ context ) {
231231 $ this ->assertEquals ('info ' , $ logLevel );
@@ -250,7 +250,7 @@ public function testHandleError()
250250 restore_error_handler ();
251251 restore_exception_handler ();
252252
253- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
253+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
254254
255255 $ line = null ;
256256 $ logArgCheck = function ($ level , $ message , $ context ) use (&$ line ) {
@@ -355,7 +355,7 @@ public function testHandleDeprecation()
355355 $ this ->assertSame ('User Deprecated: Foo deprecation ' , $ exception ->getMessage ());
356356 };
357357
358- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
358+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
359359 $ logger
360360 ->expects ($ this ->once ())
361361 ->method ('log ' )
@@ -370,7 +370,7 @@ public function testHandleDeprecation()
370370 public function testHandleException ()
371371 {
372372 try {
373- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
373+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
374374 $ handler = ErrorHandler::register ();
375375
376376 $ exception = new \Exception ('foo ' );
@@ -450,7 +450,7 @@ public function testBootstrappingLogger()
450450
451451 $ bootLogger ->log (LogLevel::WARNING , 'Foo message ' , ['exception ' => $ exception ]);
452452
453- $ mockLogger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
453+ $ mockLogger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
454454 $ mockLogger ->expects ($ this ->once ())
455455 ->method ('log ' )
456456 ->with (LogLevel::WARNING , 'Foo message ' , ['exception ' => $ exception ]);
@@ -465,7 +465,7 @@ public function testSettingLoggerWhenExceptionIsBuffered()
465465
466466 $ exception = new \Exception ('Foo message ' );
467467
468- $ mockLogger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
468+ $ mockLogger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
469469 $ mockLogger ->expects ($ this ->once ())
470470 ->method ('log ' )
471471 ->with (LogLevel::CRITICAL , 'Uncaught Exception: Foo message ' , ['exception ' => $ exception ]);
@@ -480,7 +480,7 @@ public function testSettingLoggerWhenExceptionIsBuffered()
480480 public function testHandleFatalError ()
481481 {
482482 try {
483- $ logger = $ this ->getMockBuilder (' Psr\Log\LoggerInterface ' )->getMock ();
483+ $ logger = $ this ->getMockBuilder (\ Psr \Log \LoggerInterface::class )->getMock ();
484484 $ handler = ErrorHandler::register ();
485485
486486 $ error = [
@@ -527,13 +527,13 @@ public function testHandleErrorException()
527527
528528 $ handler ->handleException ($ exception );
529529
530- $ this ->assertInstanceOf (' Symfony\Component\Debug\Exception\ClassNotFoundException ' , $ args [0 ]);
530+ $ this ->assertInstanceOf (\ Symfony \Component \Debug \Exception \ClassNotFoundException::class , $ args [0 ]);
531531 $ this ->assertStringStartsWith ("Attempted to load class \"IReallyReallyDoNotExistAnywhereInTheRepositoryISwear \" from the global namespace. \nDid you forget a \"use \" statement " , $ args [0 ]->getMessage ());
532532 }
533533
534534 public function testCustomExceptionHandler ()
535535 {
536- $ this ->expectException (' Exception ' );
536+ $ this ->expectException (\ Exception::class );
537537 $ handler = new ErrorHandler ();
538538 $ handler ->setExceptionHandler (function ($ e ) use ($ handler ) {
539539 $ handler ->handleException ($ e );
0 commit comments