From 3bc12b0434b727855408f8cdad36a1eb7f0eaea7 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 8 Sep 2022 14:58:35 +0200 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B05513=20Improve=20PHPUnit=20output=20?= =?UTF-8?q?to=20stdout=20Will=20allow=20to=20see=20progress=20when=20looki?= =?UTF-8?q?ng=20at=20the=20Jenkins=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/composer.json | 8 ++------ test/composer.lock | 42 ++++++++++++++++++++++++++++++++++++++++-- test/phpunit.xml.dist | 2 ++ 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/test/composer.json b/test/composer.json index 5e570e48d..61b516347 100644 --- a/test/composer.json +++ b/test/composer.json @@ -1,10 +1,6 @@ { "require-dev": { - "phpunit/phpunit": "^8.5.23" - }, - "autoload": { - "psr-4": { - "": "src/" - } + "phpunit/phpunit": "^8.5.23", + "sempro/phpunit-pretty-print": "^1.4" } } diff --git a/test/composer.lock b/test/composer.lock index 351e80239..1dadb48f1 100644 --- a/test/composer.lock +++ b/test/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e564642f87b1049582c4001ac479b368", + "content-hash": "e34c30ef7d10c0cee9ea3624f8378087", "packages": [], "packages-dev": [ { @@ -1597,6 +1597,44 @@ }, "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "sempro/phpunit-pretty-print", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/s360digital/phpunit-pretty-print.git", + "reference": "fa623aa8a17aece4a2b69e54b07a5e37572d1f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/s360digital/phpunit-pretty-print/zipball/fa623aa8a17aece4a2b69e54b07a5e37572d1f1d", + "reference": "fa623aa8a17aece4a2b69e54b07a5e37572d1f1d", + "shasum": "" + }, + "require": { + "php": ">=7.1.0", + "phpunit/phpunit": "^7 || ^8 || ^9" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sempro\\PHPUnitPrettyPrinter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Prettify PHPUnit output", + "support": { + "issues": "https://github.com/s360digital/phpunit-pretty-print/issues", + "source": "https://github.com/s360digital/phpunit-pretty-print/tree/1.4.0" + }, + "time": "2021-01-04T13:25:10+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.25.0", @@ -1795,5 +1833,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/test/phpunit.xml.dist b/test/phpunit.xml.dist index 1dcf5848d..a836dbd9a 100644 --- a/test/phpunit.xml.dist +++ b/test/phpunit.xml.dist @@ -16,6 +16,7 @@ stopOnRisky="false" stopOnSkipped="false" verbose="true" + printerClass="Sempro\PHPUnitPrettyPrinter\PrettyPrinter" > @@ -23,6 +24,7 @@ + From 74003f12c14215316c5ae2628826db12fc31982e Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 8 Sep 2022 18:20:52 +0200 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B05513=20Remove=20test=20name=20debug?= =?UTF-8?q?=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/ItopTestCase.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/ItopTestCase.php b/test/ItopTestCase.php index 0e983fcec..455a886fb 100644 --- a/test/ItopTestCase.php +++ b/test/ItopTestCase.php @@ -45,9 +45,6 @@ class ItopTestCase extends TestCase @include_once '../../../../../../approot.inc.php'; @include_once '../../../../../../../approot.inc.php'; @include_once '../../../../../../../../approot.inc.php'; - - $this->debug("\n----------\n---------- ".$this->getName()."\n----------\n"); - } protected function debug($sMsg)