@@ -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 ' )
@@ -523,7 +523,7 @@ public function testLegacyAsXml()
523
523
524
524
public function testRenderException ()
525
525
{
526
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
526
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
527
527
$ application ->setAutoExit (false );
528
528
$ application ->expects ($ this ->any ())
529
529
->method ('getTerminalWidth ' )
@@ -547,7 +547,7 @@ public function testRenderException()
547
547
$ tester ->run (array ('command ' => 'foo3:bar ' ), array ('decorated ' => true ));
548
548
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception3decorated.txt ' , $ tester ->getDisplay (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
549
549
550
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
550
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
551
551
$ application ->setAutoExit (false );
552
552
$ application ->expects ($ this ->any ())
553
553
->method ('getTerminalWidth ' )
@@ -560,7 +560,7 @@ public function testRenderException()
560
560
561
561
public function testRenderExceptionWithDoubleWidthCharacters ()
562
562
{
563
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
563
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
564
564
$ application ->setAutoExit (false );
565
565
$ application ->expects ($ this ->any ())
566
566
->method ('getTerminalWidth ' )
@@ -576,7 +576,7 @@ public function testRenderExceptionWithDoubleWidthCharacters()
576
576
$ tester ->run (array ('command ' => 'foo ' ), array ('decorated ' => true ));
577
577
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception_doublewidth1decorated.txt ' , $ tester ->getDisplay (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
578
578
579
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
579
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
580
580
$ application ->setAutoExit (false );
581
581
$ application ->expects ($ this ->any ())
582
582
->method ('getTerminalWidth ' )
@@ -710,7 +710,7 @@ public function testRunReturnsIntegerExitCode()
710
710
{
711
711
$ exception = new \Exception ('' , 4 );
712
712
713
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
713
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
714
714
$ application ->setAutoExit (false );
715
715
$ application ->expects ($ this ->once ())
716
716
->method ('doRun ' )
@@ -725,7 +725,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
725
725
{
726
726
$ exception = new \Exception ('' , 0 );
727
727
728
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
728
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
729
729
$ application ->setAutoExit (false );
730
730
$ application ->expects ($ this ->once ())
731
731
->method ('doRun ' )
0 commit comments