File tree Expand file tree Collapse file tree 9 files changed +115
-11
lines changed
symfony/phpunit-bridge/5.3 Expand file tree Collapse file tree 9 files changed +115
-11
lines changed Original file line number Diff line number Diff line change 22KERNEL_CLASS = ' App\Kernel'
33APP_SECRET = ' $ecretf0rt3st'
44SYMFONY_DEPRECATIONS_HELPER = 999999
5+ PANTHER_APP_ENV = panther
6+ PANTHER_ERROR_SCREENSHOT_DIR = ./var/error-screenshots
Original file line number Diff line number Diff line change 2424 <directory suffix =" .php" >src</directory >
2525 </whitelist >
2626 </filter >
27+
28+ <!-- Run `composer require symfony/phpunit-bridge` before enabling this extension -->
29+ <!--
30+ <listeners>
31+ <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
32+ </listeners>
33+ -->
34+
35+ <!-- Run `composer require symfony/panther` before enabling this extension -->
36+ <!--
37+ <extensions>
38+ <extension class="Symfony\Component\Panther\ServerExtension" />
39+ </extensions>
40+ -->
2741</phpunit >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # define your env variables for the test env here
2+ KERNEL_CLASS = ' App\Kernel'
3+ APP_SECRET = ' $ecretf0rt3st'
4+ SYMFONY_DEPRECATIONS_HELPER = 999999
5+ PANTHER_APP_ENV = panther
6+ PANTHER_ERROR_SCREENSHOT_DIR = ./var/error-screenshots
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env php
2+ <?php
3+ if (file_exists (dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' )) {
4+ require (dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' );
5+ } else {
6+ if (!file_exists (dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php ' )) {
7+ echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`. \n" ;
8+ exit (1 );
9+ }
10+
11+ if (false === getenv ('SYMFONY_PHPUNIT_DIR ' )) {
12+ putenv ('SYMFONY_PHPUNIT_DIR= ' .__DIR__ .'/.phpunit ' );
13+ }
14+
15+ require dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php ' ;
16+ }
Original file line number Diff line number Diff line change 1+ {
2+ "copy-from-recipe" : {
3+ ".env.test" : " .env.test" ,
4+ "bin/" : " %BIN_DIR%/" ,
5+ "phpunit.xml.dist" : " phpunit.xml.dist" ,
6+ "tests/" : " tests/"
7+ },
8+ "gitignore" : [
9+ " .phpunit" ,
10+ " .phpunit.result.cache" ,
11+ " /phpunit.xml"
12+ ],
13+ "aliases" : [" simple-phpunit" ]
14+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
4+ <!-- If you use phpunit-bridge directly, set -->
5+ <!-- xsi:noNamespaceSchemaLocation="bin/.phpunit/phpunit.xsd" -->
6+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
7+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
8+ backupGlobals =" false"
9+ colors =" true"
10+ bootstrap =" tests/bootstrap.php"
11+ >
12+ <php >
13+ <ini name =" error_reporting" value =" -1" />
14+ <server name =" APP_ENV" value =" test" force =" true" />
15+ <server name =" SHELL_VERBOSITY" value =" -1" />
16+ <!-- If you use phpunit-bridge directly, you can control extra behavior -->
17+ <!--
18+ <server name="SYMFONY_PHPUNIT_REMOVE" value="" />
19+ <server name="SYMFONY_PHPUNIT_VERSION" value="8.5" />
20+ -->
21+ </php >
22+
23+ <testsuites >
24+ <testsuite name =" Project Test Suite" >
25+ <directory >tests</directory >
26+ </testsuite >
27+ </testsuites >
28+
29+ <filter >
30+ <whitelist processUncoveredFilesFromWhitelist =" true" >
31+ <directory suffix =" .php" >src</directory >
32+ </whitelist >
33+ </filter >
34+
35+ <listeners >
36+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
37+ </listeners >
38+
39+ <!-- Run `composer require symfony/panther` before enabling this extension -->
40+ <!--
41+ <extensions>
42+ <extension class="Symfony\Component\Panther\ServerExtension" />
43+ </extensions>
44+ -->
45+ </phpunit >
Original file line number Diff line number Diff line change 1+ <bg=blue;fg=white> </>
2+ <bg=blue;fg=white> How to test? </>
3+ <bg=blue;fg=white> </>
4+
5+ * <fg=blue>Write</> test cases in the <comment>tests/</> folder
6+ * Use MakerBundle's <comment>make:test</> command as a shortcut!
7+ * <fg=blue>Run</> the tests with <comment>php bin/phpunit</>
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Symfony \Component \Dotenv \Dotenv ;
4+
5+ require dirname (__DIR__ ).'/vendor/autoload.php ' ;
6+
7+ if (file_exists (dirname (__DIR__ ).'/config/bootstrap.php ' )) {
8+ require dirname (__DIR__ ).'/config/bootstrap.php ' ;
9+ } elseif (method_exists (Dotenv::class, 'bootEnv ' )) {
10+ (new Dotenv ())->bootEnv (dirname (__DIR__ ).'/.env ' );
11+ }
You can’t perform that action at this time.
0 commit comments