mirror of
https://github.com/symfony/recipes.git
synced 2026-09-15 00:56:24 +03:00
Prefer simple-phpunit over direct phpunit deps
This commit is contained in:
@@ -2,5 +2,7 @@
|
||||
"copy-from-recipe": {
|
||||
"phpunit.xml.dist": "phpunit.xml.dist"
|
||||
},
|
||||
"aliases": ["phpunit"]
|
||||
"gitignore": [
|
||||
"/phpunit.xml"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,4 +21,8 @@
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Adding <comment>phpunit/phpunit</> as a dependency is <comment>discouraged</>.
|
||||
You should require <fg=green>simple-phpunit</> instead.
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
|
||||
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
|
||||
exit(1);
|
||||
}
|
||||
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
|
||||
putenv('SYMFONY_PHPUNIT_REMOVE=symfony/yaml');
|
||||
}
|
||||
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
|
||||
putenv('SYMFONY_PHPUNIT_VERSION=6.4');
|
||||
}
|
||||
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
|
||||
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
|
||||
}
|
||||
|
||||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"bin/": "%BIN_DIR%/",
|
||||
"phpunit.xml.dist": "phpunit.xml.dist"
|
||||
},
|
||||
"gitignore": [
|
||||
"/phpunit.xml"
|
||||
],
|
||||
"aliases": ["simple-phpunit"]
|
||||
"aliases": ["phpunit", "simple-phpunit"]
|
||||
}
|
||||
|
||||
@@ -21,4 +21,8 @@
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Run <comment>php bin/phpunit</> to launch your test suite.
|
||||
Reference in New Issue
Block a user