File tree Expand file tree Collapse file tree 6 files changed +100
-0
lines changed
symfony/phpunit-bridge/7.2.9999 Expand file tree Collapse file tree 6 files changed +100
-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
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
+
4
+ if (!ini_get ('date.timezone ' )) {
5
+ ini_set ('date.timezone ' , 'UTC ' );
6
+ }
7
+
8
+ if (is_file (dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' )) {
9
+ if (PHP_VERSION_ID >= 80000 ) {
10
+ require dirname (__DIR__ ).'/vendor/phpunit/phpunit/phpunit ' ;
11
+ } else {
12
+ define ('PHPUNIT_COMPOSER_INSTALL ' , dirname (__DIR__ ).'/vendor/autoload.php ' );
13
+ require PHPUNIT_COMPOSER_INSTALL ;
14
+ PHPUnit \TextUI \Command::main ();
15
+ }
16
+ } else {
17
+ if (!is_file (dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php ' )) {
18
+ echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`. \n" ;
19
+ exit (1 );
20
+ }
21
+
22
+ require dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php ' ;
23
+ }
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.result.cache" ,
10
+ " /phpunit.xml"
11
+ ],
12
+ "conflict" : {
13
+ "phpunit/phpunit" : " <9.6" ,
14
+ "symfony/framework-bundle" : " <5.4"
15
+ },
16
+ "aliases" : [" simple-phpunit" ]
17
+ }
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
+ bootstrap =" tests/bootstrap.php"
9
+ convertDeprecationsToExceptions =" false"
10
+ >
11
+ <php >
12
+ <ini name =" display_errors" value =" 1" />
13
+ <ini name =" error_reporting" value =" -1" />
14
+ <server name =" APP_ENV" value =" test" force =" true" />
15
+ <server name =" SHELL_VERBOSITY" value =" -1" />
16
+ <server name =" SYMFONY_PHPUNIT_REMOVE" value =" " />
17
+ <server name =" SYMFONY_PHPUNIT_VERSION" value =" 9.6" />
18
+ </php >
19
+
20
+ <testsuites >
21
+ <testsuite name =" Project Test Suite" >
22
+ <directory >tests</directory >
23
+ </testsuite >
24
+ </testsuites >
25
+
26
+ <coverage processUncoveredFiles =" true" >
27
+ <include >
28
+ <directory suffix =" .php" >src</directory >
29
+ </include >
30
+ </coverage >
31
+
32
+ <listeners >
33
+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
34
+ </listeners >
35
+
36
+ <extensions >
37
+ </extensions >
38
+ </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