|
@@ -201,8 +201,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
public function testSetCatchExceptions()
|
|
|
{
|
|
|
- $application = new Application();
|
|
|
+ $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
|
|
|
$application->setAutoExit(false);
|
|
|
+ $application->expects($this->any())
|
|
|
+ ->method('getTerminalWidth')
|
|
|
+ ->will($this->returnValue(120));
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
|
|
$application->setCatchExceptions(true);
|
|
@@ -237,8 +240,11 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
public function testRenderException()
|
|
|
{
|
|
|
- $application = new Application();
|
|
|
+ $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth'));
|
|
|
$application->setAutoExit(false);
|
|
|
+ $application->expects($this->any())
|
|
|
+ ->method('getTerminalWidth')
|
|
|
+ ->will($this->returnValue(120));
|
|
|
$tester = new ApplicationTester($application);
|
|
|
|
|
|
$tester->run(array('command' => 'foo'), array('decorated' => false));
|