From d8d1baf945c7ff14d758cdc3bae73ffe0157b0a4 Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Mon, 19 Sep 2022 08:45:48 +0200 Subject: [PATCH 1/5] fix tests when coverage is not available --- tests/Features/Coverage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Features/Coverage.php b/tests/Features/Coverage.php index 06246a2e..77912e63 100644 --- a/tests/Features/Coverage.php +++ b/tests/Features/Coverage.php @@ -17,7 +17,7 @@ it('adds coverage if --coverage exist', function () { $arguments = $plugin->handleArguments(['--coverage']); expect($arguments)->toEqual(['--coverage-php', Coverage::getPath()]) ->and($plugin->coverage)->toBeTrue(); -})->skip(! \Pest\Support\Coverage::isAvailable() || ! in_array('coverage', xdebug_info('mode'), true), 'Coverage is not available'); +})->skip(! \Pest\Support\Coverage::isAvailable() || ! function_exists('xdebug_info') || ! in_array('coverage', xdebug_info('mode'), true), 'Coverage is not available'); it('adds coverage if --min exist', function () { $plugin = new CoveragePlugin(new ConsoleOutput()); From eecc5984719f7e7f49c1748236646f60479cd8ff Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Mon, 19 Sep 2022 08:48:30 +0200 Subject: [PATCH 2/5] fix lint composer command --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 74437352..8fa5a4a8 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,7 @@ "bin/pest" ], "scripts": { - "lint": "pint --test", + "lint": "pint", "test:lint": "pint --test", "test:types": "phpstan analyse --ansi --memory-limit=-1 --debug", "test:unit": "php bin/pest --colors=always --exclude-group=integration --compact", From 7bc513bc2bbc766ff097175cdd586aa9aeb1d047 Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Mon, 19 Sep 2022 08:55:45 +0200 Subject: [PATCH 3/5] remove duration from success snapshot --- tests/.snapshots/success.txt | 2 +- tests/Visual/Success.php | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index fa371749..a65cea91 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -767,4 +767,4 @@ PASS Tests\Visual\Version ✓ visual snapshot of help command output - Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions) + Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions) \ No newline at end of file diff --git a/tests/Visual/Success.php b/tests/Visual/Success.php index d8928552..41cbcdce 100644 --- a/tests/Visual/Success.php +++ b/tests/Visual/Success.php @@ -27,10 +27,12 @@ test('visual snapshot of test suite on success', function () { }; if (getenv('REBUILD_SNAPSHOTS')) { - // Strip time from end of snapshot - $outputContent = preg_replace('/Time\: \s+\d+\.\d+s\s+/m', '', $output()); + $outputContent = explode("\n", $output()); + array_pop($outputContent); + array_pop($outputContent); + array_pop($outputContent); - file_put_contents($snapshot, $outputContent); + file_put_contents($snapshot, implode("\n", $outputContent)); } elseif (! getenv('EXCLUDE')) { $output = explode("\n", $output()); array_pop($output); From 2a68234bd362a6d64098c24c49cb84b643da47ae Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 19 Sep 2022 09:56:57 +0100 Subject: [PATCH 4/5] Update TODO.md --- TODO.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index 6d8487b0..9f019a91 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,5 @@ -1. TeamCity -2. Junit -3. Check all plugins -4. Parallel testing. -5. Finish Collision's todo +1. TeamCity. (oliver) +2. Junit. (oliver - i think?) +3. Check all plugins. (nuno - almost done) +4. Parallel testing. (luke) +5. Finish Collision's todo. (nuno) From 1c888ce055c80ba01fa2d696f51a6a53b40890cb Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 19 Sep 2022 10:00:17 +0100 Subject: [PATCH 5/5] Update TODO.md --- TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 9f019a91..58d25d72 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,5 @@ 1. TeamCity. (oliver) -2. Junit. (oliver - i think?) +2. Junit. (nuno) 3. Check all plugins. (nuno - almost done) 4. Parallel testing. (luke) 5. Finish Collision's todo. (nuno)