setTerminalDimensions() public method

Can be useful to force terminal dimensions for functional tests.
Deprecation: since version 3.2, to be removed in 4.0. Set the COLUMNS and LINES env vars instead.
public setTerminalDimensions ( integer $width, integer $height ) : Application
$width integer The width
$height integer The height
return Application The current application
Example #1
0
 public function testTerminalDimensions()
 {
     $application = new Application();
     $originalDimensions = $application->getTerminalDimensions();
     $this->assertCount(2, $originalDimensions);
     $width = 80;
     if ($originalDimensions[0] == $width) {
         $width = 100;
     }
     $application->setTerminalDimensions($width, 80);
     $this->assertSame(array($width, 80), $application->getTerminalDimensions());
 }