Skip to content

Testing for PHP 7 on Drupal 8 #12

Open
@agentrickard

Description

@agentrickard

The current example tests for PHP 5 versions. However, Drupal 8.6 now requires PHPUnit 6, which is not compatible with PHP 5.x.

See https://www.drupal.org/node/2957906

Running tests on Travis returns the error:

ERROR: PHPUnit testing framework version 6 or greater is required when running on PHP 7.0 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.

Can you update this example to show how we can run different versions of PHPUnit based on the PHP ENV variable in the matrix?

For example:

    - env: DRUPAL=8.6.x
      php: 7.1
    - env: DRUPAL=8.6.x
      php: 7.0
    - env: DRUPAL=8.6.x
      php: 5.6
    - env: DRUPAL=8.6.x
      php: 5.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions