@@ -42,7 +42,7 @@ public function testConstructor()
4242
4343 public function testCommandNameCannotBeEmpty ()
4444 {
45- $ this ->expectException (' LogicException ' );
45+ $ this ->expectException (\ LogicException::class );
4646 $ this ->expectExceptionMessage ('The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name. ' );
4747 (new Application ())->add (new Command ());
4848 }
@@ -115,7 +115,7 @@ public function testGetNamespaceGetNameSetName()
115115 */
116116 public function testInvalidCommandNames ($ name )
117117 {
118- $ this ->expectException (' InvalidArgumentException ' );
118+ $ this ->expectException (\ InvalidArgumentException::class );
119119 $ this ->expectExceptionMessage (sprintf ('Command name "%s" is invalid. ' , $ name ));
120120
121121 $ command = new \TestCommand ();
@@ -207,7 +207,7 @@ public function testGetHelper()
207207
208208 public function testGetHelperWithoutHelperSet ()
209209 {
210- $ this ->expectException (' LogicException ' );
210+ $ this ->expectException (\ LogicException::class );
211211 $ this ->expectExceptionMessage ('Cannot retrieve helper "formatter" because there is no HelperSet defined. ' );
212212 $ command = new \TestCommand ();
213213 $ command ->getHelper ('formatter ' );
@@ -278,15 +278,15 @@ public function testRunNonInteractive()
278278
279279 public function testExecuteMethodNeedsToBeOverridden ()
280280 {
281- $ this ->expectException (' LogicException ' );
281+ $ this ->expectException (\ LogicException::class );
282282 $ this ->expectExceptionMessage ('You must override the execute() method in the concrete command class. ' );
283283 $ command = new Command ('foo ' );
284284 $ command ->run (new StringInput ('' ), new NullOutput ());
285285 }
286286
287287 public function testRunWithInvalidOption ()
288288 {
289- $ this ->expectException (' Symfony\Component\Console\Exception\InvalidOptionException ' );
289+ $ this ->expectException (\ Symfony \Component \Console \Exception \InvalidOptionException::class );
290290 $ this ->expectExceptionMessage ('The "--bar" option does not exist. ' );
291291 $ command = new \TestCommand ();
292292 $ tester = new CommandTester ($ command );
0 commit comments