Skip to content

Commit

Permalink
Add phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
luispabon committed Jul 26, 2021
1 parent 7564e08 commit cba597f
Show file tree
Hide file tree
Showing 8 changed files with 2,410 additions and 100 deletions.
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ bin/hosts
###> friends-of-behat/symfony-extension ###
/behat.yml
###< friends-of-behat/symfony-extension ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
19 changes: 19 additions & 0 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php

if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"friends-of-behat/mink-extension": "^2.5",
"friends-of-behat/symfony-extension": "^2.2",
"phpstan/phpstan": "^0.12.92",
"phpunit/phpunit": "^9.5",
"symfony/debug-bundle": "^5.0",
"symfony/phpunit-bridge": "^5.3",
"symfony/stopwatch": "^5.0",
"symfony/var-dumper": "^5.0",
"symfony/web-profiler-bundle": "^5.0"
Expand Down
Loading

0 comments on commit cba597f

Please sign in to comment.