@@ -454,7 +454,7 @@ public function testFindAlternativeNamespace()
454
454
455
455
public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces ()
456
456
{
457
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getNamespaces ' ));
457
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getNamespaces ' ))-> getMock ( );
458
458
$ application ->expects ($ this ->once ())
459
459
->method ('getNamespaces ' )
460
460
->will ($ this ->returnValue (array ('foo:sublong ' , 'bar:sub ' )));
@@ -476,7 +476,7 @@ public function testFindWithDoubleColonInNameThrowsException()
476
476
477
477
public function testSetCatchExceptions ()
478
478
{
479
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
479
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
480
480
$ application ->setAutoExit (false );
481
481
$ application ->expects ($ this ->any ())
482
482
->method ('getTerminalWidth ' )
@@ -514,7 +514,7 @@ public function testAutoExitSetting()
514
514
515
515
public function testRenderException ()
516
516
{
517
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
517
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
518
518
$ application ->setAutoExit (false );
519
519
$ application ->expects ($ this ->any ())
520
520
->method ('getTerminalWidth ' )
@@ -546,7 +546,7 @@ public function testRenderException()
546
546
$ tester ->run (array ('command ' => 'foo3:bar ' ), array ('decorated ' => true , 'capture_stderr_separately ' => true ));
547
547
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception3decorated.txt ' , $ tester ->getErrorOutput (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
548
548
549
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
549
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
550
550
$ application ->setAutoExit (false );
551
551
$ application ->expects ($ this ->any ())
552
552
->method ('getTerminalWidth ' )
@@ -559,7 +559,7 @@ public function testRenderException()
559
559
560
560
public function testRenderExceptionWithDoubleWidthCharacters ()
561
561
{
562
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
562
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
563
563
$ application ->setAutoExit (false );
564
564
$ application ->expects ($ this ->any ())
565
565
->method ('getTerminalWidth ' )
@@ -575,7 +575,7 @@ public function testRenderExceptionWithDoubleWidthCharacters()
575
575
$ tester ->run (array ('command ' => 'foo ' ), array ('decorated ' => true , 'capture_stderr_separately ' => true ));
576
576
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception_doublewidth1decorated.txt ' , $ tester ->getErrorOutput (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
577
577
578
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
578
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
579
579
$ application ->setAutoExit (false );
580
580
$ application ->expects ($ this ->any ())
581
581
->method ('getTerminalWidth ' )
@@ -709,7 +709,7 @@ public function testRunReturnsIntegerExitCode()
709
709
{
710
710
$ exception = new \Exception ('' , 4 );
711
711
712
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
712
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
713
713
$ application ->setAutoExit (false );
714
714
$ application ->expects ($ this ->once ())
715
715
->method ('doRun ' )
@@ -724,7 +724,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
724
724
{
725
725
$ exception = new \Exception ('' , 0 );
726
726
727
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
727
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
728
728
$ application ->setAutoExit (false );
729
729
$ application ->expects ($ this ->once ())
730
730
->method ('doRun ' )
0 commit comments