@@ -447,7 +447,7 @@ public function testFindAlternativeNamespace()
447
447
448
448
public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces ()
449
449
{
450
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getNamespaces ' ));
450
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getNamespaces ' ))-> getMock ( );
451
451
$ application ->expects ($ this ->once ())
452
452
->method ('getNamespaces ' )
453
453
->will ($ this ->returnValue (array ('foo:sublong ' , 'bar:sub ' )));
@@ -469,7 +469,7 @@ public function testFindWithDoubleColonInNameThrowsException()
469
469
470
470
public function testSetCatchExceptions ()
471
471
{
472
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
472
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
473
473
$ application ->setAutoExit (false );
474
474
$ application ->expects ($ this ->any ())
475
475
->method ('getTerminalWidth ' )
@@ -516,7 +516,7 @@ public function testLegacyAsXml()
516
516
517
517
public function testRenderException ()
518
518
{
519
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
519
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
520
520
$ application ->setAutoExit (false );
521
521
$ application ->expects ($ this ->any ())
522
522
->method ('getTerminalWidth ' )
@@ -540,7 +540,7 @@ public function testRenderException()
540
540
$ tester ->run (array ('command ' => 'foo3:bar ' ), array ('decorated ' => true ));
541
541
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception3decorated.txt ' , $ tester ->getDisplay (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
542
542
543
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
543
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
544
544
$ application ->setAutoExit (false );
545
545
$ application ->expects ($ this ->any ())
546
546
->method ('getTerminalWidth ' )
@@ -556,7 +556,7 @@ public function testRenderException()
556
556
*/
557
557
public function testRenderExceptionWithDoubleWidthCharacters ()
558
558
{
559
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
559
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
560
560
$ application ->setAutoExit (false );
561
561
$ application ->expects ($ this ->any ())
562
562
->method ('getTerminalWidth ' )
@@ -572,7 +572,7 @@ public function testRenderExceptionWithDoubleWidthCharacters()
572
572
$ tester ->run (array ('command ' => 'foo ' ), array ('decorated ' => true ));
573
573
$ this ->assertStringEqualsFile (self ::$ fixturesPath .'/application_renderexception_doublewidth1decorated.txt ' , $ tester ->getDisplay (true ), '->renderException() renders a pretty exceptions with previous exceptions ' );
574
574
575
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('getTerminalWidth ' ));
575
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('getTerminalWidth ' ))-> getMock ( );
576
576
$ application ->setAutoExit (false );
577
577
$ application ->expects ($ this ->any ())
578
578
->method ('getTerminalWidth ' )
@@ -706,7 +706,7 @@ public function testRunReturnsIntegerExitCode()
706
706
{
707
707
$ exception = new \Exception ('' , 4 );
708
708
709
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
709
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
710
710
$ application ->setAutoExit (false );
711
711
$ application ->expects ($ this ->once ())
712
712
->method ('doRun ' )
@@ -721,7 +721,7 @@ public function testRunReturnsExitCodeOneForExceptionCodeZero()
721
721
{
722
722
$ exception = new \Exception ('' , 0 );
723
723
724
- $ application = $ this ->getMock ('Symfony\Component\Console\Application ' , array ('doRun ' ));
724
+ $ application = $ this ->getMockBuilder ('Symfony\Component\Console\Application ' )-> setMethods ( array ('doRun ' ))-> getMock ( );
725
725
$ application ->setAutoExit (false );
726
726
$ application ->expects ($ this ->once ())
727
727
->method ('doRun ' )
0 commit comments