Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.35 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.35 KB

scheb/2fa - app

Test application and integration tests for scheb/2fa.

Setup

To setup the test application, run composer install in this directory (the app directory!).

Test Application

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 and 222

Integration tests

To execute the integration tests, run vendor/bin/phpunit in this directory.

Configuration Presets

This test application comes with multiple configuration presets:

  • default - The default preset, using the classic Symfony security system
  • authenticators - 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 authenticators preset:

# Start the application with the config preset
TEST_CONFIG=authenticators symfony serve

# Run integration tests with the config preset
TEST_CONFIG=authenticators vendor/bin/phpunit

It's advised to delete the var/cache folder whenever you change configuration presets.