[Console] Mock terminal size to prevent formatting errors on small terminals
This commit is contained in:
parent
1387415ec3
commit
8a2b115824
@ -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));
|
||||
|
Reference in New Issue
Block a user