From 46ffdf9c7a744e901d831b15715693bb844098f4 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 15 Sep 2022 12:07:32 +0100 Subject: [PATCH] Enables integration --- TODO.md | 14 +-- composer.json | 11 +- overrides/Runner/TestSuiteLoader.php | 4 +- phpunit.xml | 2 +- src/TestCases/IgnorableTest.php | 21 ++++ src/TestCases/IgnorableTestCase.php | 16 --- tests/.snapshots/success.txt | 142 +++++++++++++++++-------- tests/Playground.php | 2 +- tests/Visual/SingleTestOrDirectory.php | 2 +- 9 files changed, 134 insertions(+), 80 deletions(-) create mode 100644 src/TestCases/IgnorableTest.php delete mode 100644 src/TestCases/IgnorableTestCase.php diff --git a/TODO.md b/TODO.md index a9cda278..9f20487a 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,7 @@ -1. Support for `--help` pest options. -2. Support for `default` printer. -3. Support for `TeamCity` printer. -4. Support for `JUnit` log. -5. Plugins -6. Parallel -7. Collision's todo... +1. TeamCity +2. Junit +3. Help display +4. Thanks display +5. Check all plugins +6. Parallel testing. +7. Finish Collision's todo diff --git a/composer.json b/composer.json index a2c246ce..98299cf3 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ ] }, "require-dev": { - "illuminate/console": "^9.29", - "illuminate/support": "^9.29", + "illuminate/console": "^9.30", + "illuminate/support": "^9.30", "laravel/dusk": "^6.25.1", "pestphp/pest-dev-tools": "dev-master" }, @@ -68,12 +68,13 @@ "test:types": "phpstan analyse --ansi --memory-limit=-1 --debug", "test:unit": "php bin/pest --colors=always --exclude-group=integration", "test:parallel": "exit 1", - "test:integration": "exit 1", - "update:snapshots": "exit 1", + "test:integration": "php bin/pest --colors=always --group=integration", + "update:snapshots": "REBUILD_SNAPSHOTS=true php bin/pest --colors=always", "test": [ "@test:lint", "@test:types", - "@test:unit" + "@test:unit", + "@test:integration" ] }, "extra": { diff --git a/overrides/Runner/TestSuiteLoader.php b/overrides/Runner/TestSuiteLoader.php index 8745fdea..9b4b1209 100644 --- a/overrides/Runner/TestSuiteLoader.php +++ b/overrides/Runner/TestSuiteLoader.php @@ -45,7 +45,7 @@ use function class_exists; use function get_declared_classes; use Pest\Contracts\HasPrintableTestCaseName; -use Pest\TestCases\IgnorableTestCase; +use Pest\TestCases\IgnorableTest; use Pest\TestSuite; use PHPUnit\Framework\TestCase; use ReflectionClass; @@ -178,6 +178,6 @@ final class TestSuiteLoader private function exceptionFor(string $className, string $filename): ReflectionClass { - return new ReflectionClass(IgnorableTestCase::class); + return new ReflectionClass(IgnorableTest::class); } } diff --git a/phpunit.xml b/phpunit.xml index 2811352b..f17efc3c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,7 @@ bootstrap="vendor/autoload.php" cacheResult="false" colors="true" - failOnRisky="true" + failOnRisky="false" failOnWarning="true" processIsolation="false" stopOnError="false" diff --git a/src/TestCases/IgnorableTest.php b/src/TestCases/IgnorableTest.php new file mode 100644 index 00000000..39ea00ab --- /dev/null +++ b/src/TestCases/IgnorableTest.php @@ -0,0 +1,21 @@ +toBeTrue(); + // .. }); diff --git a/tests/Visual/SingleTestOrDirectory.php b/tests/Visual/SingleTestOrDirectory.php index d3b07144..41a6a46c 100644 --- a/tests/Visual/SingleTestOrDirectory.php +++ b/tests/Visual/SingleTestOrDirectory.php @@ -3,7 +3,7 @@ use Symfony\Component\Process\Process; $run = function (string $target, $decorated = false) { - $process = new Process(['php', 'bin/pest', $target], dirname(__DIR__, 2)); + $process = new Process(['php', 'bin/pest', $target, '--colors=always'], dirname(__DIR__, 2)); $process->run();