Skip to content

Commit 582782a

Browse files
committed
add phpunit
1 parent 28ea822 commit 582782a

File tree

9 files changed

+2126
-29
lines changed

9 files changed

+2126
-29
lines changed

.env.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@
2222
###> lexik/jwt-authentication-bundle ###
2323
/config/jwt/*.pem
2424
###< lexik/jwt-authentication-bundle ###
25+
26+
###> symfony/phpunit-bridge ###
27+
.phpunit.result.cache
28+
/phpunit.xml
29+
###< symfony/phpunit-bridge ###
30+
31+
###> phpunit/phpunit ###
32+
/phpunit.xml
33+
.phpunit.result.cache
34+
###< phpunit/phpunit ###

bin/phpunit

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
10+
require PHPUNIT_COMPOSER_INSTALL;
11+
PHPUnit\TextUI\Command::main();
12+
} else {
13+
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
14+
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
15+
exit(1);
16+
}
17+
18+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
19+
}

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
}
7676
},
7777
"require-dev": {
78-
"symfony/maker-bundle": "^1.49"
78+
"phpunit/phpunit": "^9.5",
79+
"symfony/browser-kit": "6.3.*",
80+
"symfony/css-selector": "6.3.*",
81+
"symfony/maker-bundle": "^1.49",
82+
"symfony/phpunit-bridge": "^6.3"
7983
}
8084
}

0 commit comments

Comments
 (0)