Skip to content

Commit 1d2db49

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: [Serializer] Respect ignored attributes in cache key of normalizer fix resetting the COLUMN environment variable Fix TestRunner compatibility to PhpUnit 8 prevent mixup of the object to populate
2 parents 7465206 + 15a9104 commit 1d2db49

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Tests/ApplicationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ protected function setUp()
4848
$this->colSize = getenv('COLUMNS');
4949
}
5050

51+
protected function tearDown()
52+
{
53+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
54+
putenv('SHELL_VERBOSITY');
55+
unset($_ENV['SHELL_VERBOSITY']);
56+
unset($_SERVER['SHELL_VERBOSITY']);
57+
}
58+
5159
public static function setUpBeforeClass()
5260
{
5361
self::$fixturesPath = realpath(__DIR__.'/Fixtures/');
@@ -1749,14 +1757,6 @@ public function testThrowingErrorListener()
17491757
$tester = new ApplicationTester($application);
17501758
$tester->run(['command' => 'foo']);
17511759
}
1752-
1753-
protected function tearDown()
1754-
{
1755-
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
1756-
putenv('SHELL_VERBOSITY');
1757-
unset($_ENV['SHELL_VERBOSITY']);
1758-
unset($_SERVER['SHELL_VERBOSITY']);
1759-
}
17601760
}
17611761

17621762
class CustomApplication extends Application

Tests/Helper/ProgressBarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp()
3333

3434
protected function tearDown()
3535
{
36-
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
36+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
3737
}
3838

3939
public function testMultipleStart()

Tests/Style/SymfonyStyleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function setUp()
3838

3939
protected function tearDown()
4040
{
41-
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
41+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
4242
$this->command = null;
4343
$this->tester = null;
4444
}

Tests/TerminalTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ protected function setUp()
2525
$this->lineSize = getenv('LINES');
2626
}
2727

28+
protected function tearDown()
29+
{
30+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
31+
putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize);
32+
}
33+
2834
public function test()
2935
{
3036
putenv('COLUMNS=100');
@@ -40,12 +46,6 @@ public function test()
4046
$this->assertSame(60, $terminal->getHeight());
4147
}
4248

43-
protected function tearDown()
44-
{
45-
putenv($this->colSize ? 'COLUMNS' : 'COLUMNS='.$this->colSize);
46-
putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize);
47-
}
48-
4949
public function test_zero_values()
5050
{
5151
putenv('COLUMNS=0');

0 commit comments

Comments
 (0)