Skip to content

Commit c6193bf

Browse files
-
1 parent decf443 commit c6193bf

File tree

5 files changed

+26
-39
lines changed

5 files changed

+26
-39
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@
2525

2626
abstract class AbstractDescriptorTest extends TestCase
2727
{
28+
private $colSize;
29+
30+
protected function setUp(): void
31+
{
32+
$this->colSize = getenv('COLUMNS');
33+
putenv('COLUMNS=121');
34+
}
35+
36+
protected function tearDown(): void
37+
{
38+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
39+
}
40+
2841
/** @dataProvider getDescribeRouteCollectionTestData */
2942
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)
3043
{

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@
1515

1616
class TextDescriptorTest extends AbstractDescriptorTest
1717
{
18-
private $colSize;
19-
20-
protected function setUp(): void
21-
{
22-
$this->colSize = getenv('COLUMNS');
23-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
24-
}
25-
26-
protected function tearDown(): void
27-
{
28-
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
29-
}
30-
3118
protected function getDescriptor()
3219
{
3320
return new TextDescriptor();

src/Symfony/Component/Form/Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@
2828

2929
abstract class AbstractDescriptorTest extends TestCase
3030
{
31+
private $colSize;
32+
33+
protected function setUp(): void
34+
{
35+
$this->colSize = getenv('COLUMNS');
36+
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
37+
}
38+
39+
protected function tearDown(): void
40+
{
41+
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
42+
}
43+
3144
/** @dataProvider getDescribeDefaultsTestData */
3245
public function testDescribeDefaults($object, array $options, $fixtureName)
3346
{

src/Symfony/Component/Form/Tests/Console/Descriptor/JsonDescriptorTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@
1515

1616
class JsonDescriptorTest extends AbstractDescriptorTest
1717
{
18-
private $colSize;
19-
20-
protected function setUp(): void
21-
{
22-
$this->colSize = getenv('COLUMNS');
23-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
24-
}
25-
26-
protected function tearDown(): void
27-
{
28-
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
29-
}
30-
3118
protected function getDescriptor()
3219
{
3320
return new JsonDescriptor();

src/Symfony/Component/Form/Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@
1515

1616
class TextDescriptorTest extends AbstractDescriptorTest
1717
{
18-
private $colSize;
19-
20-
protected function setUp(): void
21-
{
22-
$this->colSize = getenv('COLUMNS');
23-
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
24-
}
25-
26-
protected function tearDown(): void
27-
{
28-
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
29-
}
30-
3118
protected function getDescriptor()
3219
{
3320
return new TextDescriptor();

0 commit comments

Comments
 (0)