From 053077a3c6d538b437673b1584b93c1c5c5560a2 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 27 Feb 2021 10:38:23 -0500 Subject: [PATCH 1/3] Making phpunit direct recipe match phpunit-bridge --- phpunit/phpunit/4.7/.env.test | 2 ++ phpunit/phpunit/4.7/phpunit.xml.dist | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/phpunit/phpunit/4.7/.env.test b/phpunit/phpunit/4.7/.env.test index 24a43c03..9e7162f0 100644 --- a/phpunit/phpunit/4.7/.env.test +++ b/phpunit/phpunit/4.7/.env.test @@ -2,3 +2,5 @@ KERNEL_CLASS='App\Kernel' APP_SECRET='$ecretf0rt3st' SYMFONY_DEPRECATIONS_HELPER=999999 +PANTHER_APP_ENV=panther +PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots diff --git a/phpunit/phpunit/4.7/phpunit.xml.dist b/phpunit/phpunit/4.7/phpunit.xml.dist index 214665a4..4b9029be 100644 --- a/phpunit/phpunit/4.7/phpunit.xml.dist +++ b/phpunit/phpunit/4.7/phpunit.xml.dist @@ -24,4 +24,18 @@ src + + + + + + From 59f0b3937120276a55ec95655f409f72c798d14b Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 27 Feb 2021 10:38:48 -0500 Subject: [PATCH 2/3] removing the recommendation when installing phpunit directly --- phpunit/phpunit/4.7/post-install.txt | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 phpunit/phpunit/4.7/post-install.txt diff --git a/phpunit/phpunit/4.7/post-install.txt b/phpunit/phpunit/4.7/post-install.txt deleted file mode 100644 index 937bc071..00000000 --- a/phpunit/phpunit/4.7/post-install.txt +++ /dev/null @@ -1,11 +0,0 @@ - - Suggest: install Symfony's PHPUnit Bridge instead of phpunit/phpunit - - -Symfony's PHPUnit bridge is a wrapper around PHPUnit that adds reports for deprecated code -calls, an isolated PHPUnit that's separate from the dependencies of your app and more. -See: https://symfony.com/doc/current/components/phpunit_bridge.html. - - * If you want to install the PHPUnit bridge: - 1. Remove PHPUnit: composer remove --dev phpunit/phpunit - 2. Install Symfony's bridge: composer require --dev symfony/phpunit-bridge From 1a88b62d99ba69499e91a39e5583dfe9f9ef69ef Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 27 Feb 2021 10:53:40 -0500 Subject: [PATCH 3/3] Adding phpunit-bridge 5.3 recipe, which recommends using PHPUnit directly --- symfony/phpunit-bridge/5.3/.env.test | 6 +++ symfony/phpunit-bridge/5.3/bin/phpunit | 16 +++++++ symfony/phpunit-bridge/5.3/manifest.json | 14 ++++++ symfony/phpunit-bridge/5.3/phpunit.xml.dist | 45 +++++++++++++++++++ symfony/phpunit-bridge/5.3/post-install.txt | 7 +++ .../phpunit-bridge/5.3/tests/bootstrap.php | 11 +++++ 6 files changed, 99 insertions(+) create mode 100644 symfony/phpunit-bridge/5.3/.env.test create mode 100755 symfony/phpunit-bridge/5.3/bin/phpunit create mode 100644 symfony/phpunit-bridge/5.3/manifest.json create mode 100644 symfony/phpunit-bridge/5.3/phpunit.xml.dist create mode 100644 symfony/phpunit-bridge/5.3/post-install.txt create mode 100644 symfony/phpunit-bridge/5.3/tests/bootstrap.php diff --git a/symfony/phpunit-bridge/5.3/.env.test b/symfony/phpunit-bridge/5.3/.env.test new file mode 100644 index 00000000..9e7162f0 --- /dev/null +++ b/symfony/phpunit-bridge/5.3/.env.test @@ -0,0 +1,6 @@ +# define your env variables for the test env here +KERNEL_CLASS='App\Kernel' +APP_SECRET='$ecretf0rt3st' +SYMFONY_DEPRECATIONS_HELPER=999999 +PANTHER_APP_ENV=panther +PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots diff --git a/symfony/phpunit-bridge/5.3/bin/phpunit b/symfony/phpunit-bridge/5.3/bin/phpunit new file mode 100755 index 00000000..0fb80c9a --- /dev/null +++ b/symfony/phpunit-bridge/5.3/bin/phpunit @@ -0,0 +1,16 @@ +#!/usr/bin/env php + + + + + + + + + + + + + + + + + tests + + + + + + src + + + + + + + + + + diff --git a/symfony/phpunit-bridge/5.3/post-install.txt b/symfony/phpunit-bridge/5.3/post-install.txt new file mode 100644 index 00000000..7bb15321 --- /dev/null +++ b/symfony/phpunit-bridge/5.3/post-install.txt @@ -0,0 +1,7 @@ + + How to test? + + + * Write test cases in the tests/ folder + * Use MakerBundle's make:test command as a shortcut! + * Run the tests with php bin/phpunit diff --git a/symfony/phpunit-bridge/5.3/tests/bootstrap.php b/symfony/phpunit-bridge/5.3/tests/bootstrap.php new file mode 100644 index 00000000..469dccee --- /dev/null +++ b/symfony/phpunit-bridge/5.3/tests/bootstrap.php @@ -0,0 +1,11 @@ +bootEnv(dirname(__DIR__).'/.env'); +}