This commit is contained in:
Nicolas Grekas 2021-06-27 14:32:53 +02:00
parent decf443a20
commit c6193bf85d
5 changed files with 26 additions and 39 deletions

View File

@ -25,6 +25,19 @@ use Symfony\Component\Routing\RouteCollection;
abstract class AbstractDescriptorTest extends TestCase
{
private $colSize;
protected function setUp(): void
{
$this->colSize = getenv('COLUMNS');
putenv('COLUMNS=121');
}
protected function tearDown(): void
{
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
}
/** @dataProvider getDescribeRouteCollectionTestData */
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)
{

View File

@ -15,19 +15,6 @@ use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor;
class TextDescriptorTest extends AbstractDescriptorTest
{
private $colSize;
protected function setUp(): void
{
$this->colSize = getenv('COLUMNS');
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
}
protected function tearDown(): void
{
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
}
protected function getDescriptor()
{
return new TextDescriptor();

View File

@ -28,6 +28,19 @@ use Symfony\Component\Security\Csrf\CsrfTokenManager;
abstract class AbstractDescriptorTest extends TestCase
{
private $colSize;
protected function setUp(): void
{
$this->colSize = getenv('COLUMNS');
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
}
protected function tearDown(): void
{
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
}
/** @dataProvider getDescribeDefaultsTestData */
public function testDescribeDefaults($object, array $options, $fixtureName)
{

View File

@ -15,19 +15,6 @@ use Symfony\Component\Form\Console\Descriptor\JsonDescriptor;
class JsonDescriptorTest extends AbstractDescriptorTest
{
private $colSize;
protected function setUp(): void
{
$this->colSize = getenv('COLUMNS');
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
}
protected function tearDown(): void
{
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
}
protected function getDescriptor()
{
return new JsonDescriptor();

View File

@ -15,19 +15,6 @@ use Symfony\Component\Form\Console\Descriptor\TextDescriptor;
class TextDescriptorTest extends AbstractDescriptorTest
{
private $colSize;
protected function setUp(): void
{
$this->colSize = getenv('COLUMNS');
putenv('COLUMNS='.(119 + \strlen(\PHP_EOL)));
}
protected function tearDown(): void
{
putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS');
}
protected function getDescriptor()
{
return new TextDescriptor();