Skip to content

Commit

Permalink
Recipe: symfony/phpunit-bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Nov 19, 2023
1 parent b67c906 commit 09c2bdc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 40 deletions.
10 changes: 7 additions & 3 deletions bin/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ if (!ini_get('date.timezone')) {
}

if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
if (PHP_VERSION_ID >= 80000) {
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
} else {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
Expand Down
15 changes: 3 additions & 12 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
convertDeprecationsToExceptions="false"
displayDetailsOnTestsThatTriggerDeprecations="true"
>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
</php>

<testsuites>
Expand All @@ -23,15 +22,7 @@
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<coverage />

<extensions>
</extensions>
Expand Down
2 changes: 1 addition & 1 deletion symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.3",
"ref": "01dfaa98c58f7a7b5a9b30e6edb7074af7ed9819"
"ref": "1f5830c331065b6e4c9d5fa2105e322d29fcd573"
},
"files": [
".env.test",
Expand Down
24 changes: 0 additions & 24 deletions tests/AdminAreaTest.php

This file was deleted.

0 comments on commit 09c2bdc

Please sign in to comment.