File tree Expand file tree Collapse file tree 7 files changed +73
-2
lines changed Expand file tree Collapse file tree 7 files changed +73
-2
lines changed Original file line number Diff line number Diff line change 9
9
" .phpunit" ,
10
10
" /phpunit.xml"
11
11
],
12
- "aliases" : [" phpunit " , " simple-phpunit" ]
12
+ "aliases" : [" simple-phpunit" ]
13
13
}
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env php
2
+ <?php
3
+
4
+ if (!file_exists (dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit ' )) {
5
+ echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`. \n" ;
6
+ exit (1 );
7
+ }
8
+ if (false === getenv ('SYMFONY_PHPUNIT_REMOVE ' )) {
9
+ putenv ('SYMFONY_PHPUNIT_REMOVE= ' );
10
+ }
11
+ if (false === getenv ('SYMFONY_PHPUNIT_VERSION ' )) {
12
+ putenv ('SYMFONY_PHPUNIT_VERSION=6.5 ' );
13
+ }
14
+ if (false === getenv ('SYMFONY_PHPUNIT_DIR ' )) {
15
+ putenv ('SYMFONY_PHPUNIT_DIR= ' .__DIR__ .'/.phpunit ' );
16
+ }
17
+
18
+ require dirname (__DIR__ ).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit ' ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "copy-from-recipe" : {
3
+ "bin/" : " %BIN_DIR%/" ,
4
+ "phpunit.xml.dist" : " phpunit.xml.dist" ,
5
+ "tests/" : " tests/"
6
+ },
7
+ "gitignore" : [
8
+ " .phpunit" ,
9
+ " /phpunit.xml"
10
+ ],
11
+ "aliases" : [" simple-phpunit" ]
12
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.1/phpunit.xsd"
6
+ backupGlobals =" false"
7
+ colors =" true"
8
+ bootstrap =" vendor/autoload.php"
9
+ >
10
+ <php >
11
+ <ini name =" error_reporting" value =" -1" />
12
+ <env name =" KERNEL_CLASS" value =" App\Kernel" />
13
+ <env name =" APP_ENV" value =" test" />
14
+ <env name =" APP_DEBUG" value =" 1" />
15
+ <env name =" APP_SECRET" value =" s$cretf0rt3st" />
16
+ <env name =" SHELL_VERBOSITY" value =" -1" />
17
+ <!-- define your env variables for the test env here -->
18
+ </php >
19
+
20
+ <testsuites >
21
+ <testsuite name =" Project Test Suite" >
22
+ <directory >tests/</directory >
23
+ </testsuite >
24
+ </testsuites >
25
+
26
+ <filter >
27
+ <whitelist >
28
+ <directory >./src/</directory >
29
+ </whitelist >
30
+ </filter >
31
+
32
+ <listeners >
33
+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
34
+ </listeners >
35
+ </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
+ * <fg=blue>Run</> <comment>php bin/phpunit</>
Original file line number Diff line number Diff line change 1
1
{
2
- "aliases" : [" test" , " tests" ]
2
+ "aliases" : [" test" , " tests" , " phpunit " ]
3
3
}
You can’t perform that action at this time.
0 commit comments