Can be useful to force terminal dimensions for functional tests.
public setTerminalDimensions ( integer $width, integer $height ) : |
||
$width | integer | The width |
$height | integer | The height |
return | The current application |
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()); }