Skip to content

Initial test setup #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
docker compose run --rm phpfpm bin/console doctrine:fixtures:load --no-interaction

test-suite:
if: false # Currently the project has no tests
name: Test suite
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,15 @@ package-lock.json
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
bin
test-results
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ Below are directions to set up, run, and maintain the project effectively.

---

## Testing

The standard Symfony test pack is installed along with the panther package. Please the relevant Symfomny
docs for more info:
* [Application Tests](https://symfony.com/doc/current/testing.html#application-tests)
* [End to End Tests (E2E)](https://symfony.com/doc/current/testing/end_to_end.html)

Note that to have javascript executed in the tests you have to follow "End to End" testing, as this will
use a full headless browser for the tests.

## Building assets

The assets [app.css](/assets/styles/app.css) and [app.js](/assets/app.js) are served through webpack.
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
"phpstan/phpstan-doctrine": "^2.0.1",
"phpstan/phpstan-phpunit": "^2.0.4",
"phpstan/phpstan-symfony": "^2.0.2",
"phpunit/phpunit": "^11.5",
"symfony/browser-kit": "7.2.*",
"symfony/css-selector": "7.2.*",
"symfony/panther": "^2.2",
"symfony/phpunit-bridge": "^7.2",
"symfony/stopwatch": "~7.2.2",
"symfony/web-profiler-bundle": "~7.2.3",
"vincentlanglet/twig-cs-fixer": "^3.5.1"
Expand Down
Loading
Loading