before_script:
  # Set up WordPress tests
  - bash bin/install-wp-tests.sh $MYSQL_DATABASE root $MYSQL_ROOT_PASSWORD mysql $WP_VERSION true

  # PHPUnit
  - |
    if [[ $(php -v) =~ "PHP 8." ]]; then
      composer global require "phpunit/phpunit=9.*"
    elif [[ $(php -v) =~ "PHP 7." ]]; then
      composer global require "phpunit/phpunit=6.1.*"
    elif [[ $(php -v) =~ "PHP 5.6" ]]; then
      composer global require "phpunit/phpunit=5.7.*"
    fi

  # PHPUnit requirements
  - composer global require yoast/phpunit-polyfills
