File tree Expand file tree Collapse file tree 5 files changed +76
-0
lines changed Expand file tree Collapse file tree 5 files changed +76
-0
lines changed 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
Original file line number Diff line number Diff line change 1+ {
2+ "copy-from-recipe" : {
3+ ".env.test" : " .env.test" ,
4+ "phpunit.dist.xml" : " phpunit.dist.xml" ,
5+ "tests/" : " tests/"
6+ },
7+ "gitignore" : [
8+ " /phpunit.xml" ,
9+ " /.phpunit.cache/"
10+ ]
11+ }
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+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
6+ backupGlobals =" false"
7+ colors =" true"
8+ failOnDeprecation =" true"
9+ failOnNotice =" true"
10+ failOnWarning =" true"
11+ bootstrap =" tests/bootstrap.php"
12+ cacheDirectory =" .phpunit.cache"
13+ >
14+ <php >
15+ <ini name =" display_errors" value =" 1" />
16+ <ini name =" error_reporting" value =" -1" />
17+ <server name =" APP_ENV" value =" test" force =" true" />
18+ <server name =" SHELL_VERBOSITY" value =" -1" />
19+ </php >
20+
21+ <testsuites >
22+ <testsuite name =" Project Test Suite" >
23+ <directory >tests</directory >
24+ </testsuite >
25+ </testsuites >
26+
27+ <source ignoreSuppressionOfDeprecations =" true"
28+ ignoreIndirectDeprecations =" true"
29+ restrictNotices =" true"
30+ restrictWarnings =" true"
31+ >
32+ <include >
33+ <directory >src</directory >
34+ </include >
35+
36+ <deprecationTrigger >
37+ <function >trigger_deprecation</function >
38+ <method >Doctrine\Deprecations\Deprecation::trigger</method >
39+ <method >Doctrine\Deprecations\Deprecation::delegateTriggerToBackend</method >
40+ </deprecationTrigger >
41+ </source >
42+
43+ <extensions >
44+ </extensions >
45+ </phpunit >
Original file line number Diff line number Diff line change 1+ * <fg=blue>Write</> test cases in the <comment>tests/</> folder
2+ * Use MakerBundle's <comment>make:test</> command as a shortcut!
3+ * <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 (method_exists (Dotenv::class, 'bootEnv ' )) {
8+ (new Dotenv ())->bootEnv (dirname (__DIR__ ).'/.env ' );
9+ }
10+
11+ if ($ _SERVER ['APP_DEBUG ' ]) {
12+ umask (0000 );
13+ }
You can’t perform that action at this time.
0 commit comments