From 2f38210c158c18eda567bf9da04fe04005b371f5 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Wed, 17 Oct 2018 18:40:07 +0200 Subject: [PATCH] Closes #3353 --- ChangeLog-7.4.md | 1 + src/TextUI/TestRunner.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog-7.4.md b/ChangeLog-7.4.md index ca5256c2d0e..71f253ea7c1 100644 --- a/ChangeLog-7.4.md +++ b/ChangeLog-7.4.md @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 7.4 release series are documented in this fil ### Fixed * Fixed [#3321](https://github.com/sebastianbergmann/phpunit/pull/3321): Incorrect TestDox output for data provider with indexed array +* Fixed [#3353](https://github.com/sebastianbergmann/phpunit/issues/3353): Requesting less than 16 columns of output results in an error ## [7.4.0] - 2018-10-05 diff --git a/src/TextUI/TestRunner.php b/src/TextUI/TestRunner.php index ebcdb976811..0a74f11ea49 100644 --- a/src/TextUI/TestRunner.php +++ b/src/TextUI/TestRunner.php @@ -158,6 +158,11 @@ public function doRun(Test $suite, array $arguments = [], bool $exit = true): Te $this->handleConfiguration($arguments); + if ($arguments['columns'] < 16) { + $arguments['columns'] = 16; + $tooFewColumnsRequested = true; + } + if (isset($arguments['bootstrap'])) { $GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap']; } @@ -354,6 +359,10 @@ public function doRun(Test $suite, array $arguments = [], bool $exit = true): Te } } + if (isset($tooFewColumnsRequested)) { + $this->writeMessage('Error', 'Less than 16 columns requested, number of columns set to 16'); + } + if ($this->runtime->discardsComments()) { $this->writeMessage('Warning', 'opcache.save_comments=0 set; annotations will not work'); }