Test application and integration tests for scheb/2fa.
To setup the test application, run composer install
in this directory.
Start the application via Symfony CLI by running symfony serve
in this directory.
There's a pre-configured user in the SQLite database that you can use to login and test 2fa:
- Username:
user1
- Password:
test
- Backup codes for 2fa:
111
and222
To execute the integration tests, run vendor/bin/phpunit
in this directory.
This test application comes with multiple configuration presets:
default
- The default preset, using the classic Symfony security systemauthenticator
- Using the newer "authenticator"-based Symfony security system
To run the test application with a specific preset, set the environment variable TEST_CONFIG
. For example, to use the
authenticator
preset:
# Start the application with the config preset
TEST_CONFIG=authenticator symfony serve
# Run integration tests with the config preset
TEST_CONFIG=authenticator vendor/bin/phpunit
It's advised to delete the var/cache
folder whenever you change configuration presets.