Running tests

  • PHPUnit

    vendor/bin/phpunit
    
  • PHPSpec

    vendor/bin/phpspec run
    
  • Behat (non-JS scenarios)

    vendor/bin/behat --strict --tags="~@javascript"
    
  • Behat (JS scenarios)

    1. Install Symfony CLI command.

    2. Start Headless Chrome:

      google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1
    
    1. Install SSL certificates (only once needed) and run test application’s webserver on 127.0.0.1:8080:
      symfony server:ca:install
      APP_ENV=test symfony server:start --port=8080 --dir=tests/Application/public --daemon
    
    1. Run Behat:
      vendor/bin/behat --strict --tags="@javascript"
    
  • Static Analysis

    • Psalm

      vendor/bin/psalm
      
    • PHPStan

      vendor/bin/phpstan analyse
      
  • Coding Standard

    vendor/bin/ecs check