WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/23/2017 02:05:12 AM (2 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Add support for PHPUnit 6+.

This adds a compatibility shim for the new namespaced structure of PHPUnit and the removed setExpectedException() method. In addition, this updates the Travis config so PHPUnit 6.1 is used where appropriate.

Props miyauchi, gitlost.

Fixes #39822

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/bootstrap.php

    r40065 r40536  
    44 */
    55
     6/**
     7 * Compatibility with PHPUnit 6+
     8 */
     9if ( class_exists( 'PHPUnit\Runner\Version' ) ) {
     10    require_once dirname( __FILE__ ) . '/phpunit6-compat.php';
     11}
    612
    713$config_file_path = dirname( dirname( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.