fix resetting the COLUMN environment variable
This commit is contained in:
parent
d7a8b3d5e1
commit
8fb2074972
|
@ -48,6 +48,14 @@ class ApplicationTest extends TestCase
|
|||
$this->colSize = getenv('COLUMNS');
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
|
||||
putenv('SHELL_VERBOSITY');
|
||||
unset($_ENV['SHELL_VERBOSITY']);
|
||||
unset($_SERVER['SHELL_VERBOSITY']);
|
||||
}
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
self::$fixturesPath = realpath(__DIR__.'/Fixtures/');
|
||||
|
@ -1698,14 +1706,6 @@ class ApplicationTest extends TestCase
|
|||
$this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found');
|
||||
}
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
|
||||
putenv('SHELL_VERBOSITY');
|
||||
unset($_ENV['SHELL_VERBOSITY']);
|
||||
unset($_SERVER['SHELL_VERBOSITY']);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomApplication extends Application
|
||||
|
|
|
@ -31,7 +31,7 @@ class ProgressBarTest extends TestCase
|
|||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
|
||||
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
|
||||
}
|
||||
|
||||
public function testMultipleStart()
|
||||
|
|
|
@ -38,7 +38,7 @@ class SymfonyStyleTest extends TestCase
|
|||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
|
||||
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
|
||||
$this->command = null;
|
||||
$this->tester = null;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,12 @@ class TerminalTest extends TestCase
|
|||
$this->lineSize = getenv('LINES');
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
|
||||
putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize);
|
||||
}
|
||||
|
||||
public function test()
|
||||
{
|
||||
putenv('COLUMNS=100');
|
||||
|
@ -40,12 +46,6 @@ class TerminalTest extends TestCase
|
|||
$this->assertSame(60, $terminal->getHeight());
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
|
||||
putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize);
|
||||
}
|
||||
|
||||
public function test_zero_values()
|
||||
{
|
||||
putenv('COLUMNS=0');
|
||||
|
|
Reference in New Issue