Make WordPress Core


Ignore:
Timestamp:
04/24/2017 12:37:19 AM (8 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Backport various recent changes to the 4.7 branch.

  • Add support for PHPUnit 6+.
  • Add Composer files to the cache on Travis.
  • Remove HHVM from the test infrastructure on Travis.

Merges [40536], [40538], [40539], and [40546] to the 4.7 branch.

See #40539
Fixes #39822, #40548

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/includes/testcase-ajax.php

    r38168 r40547  
    201201            $this->_last_response = $buffer;
    202202    }
     203
     204    /**
     205     * PHPUnit 6+ compatibility shim.
     206     *
     207     * @param mixed      $exception
     208     * @param string     $message
     209     * @param int|string $code
     210     */
     211    public function setExpectedException( $exception, $message = '', $code = null ) {
     212        if ( is_callable( 'parent::setExpectedException' ) ) {
     213            parent::setExpectedException( $exception, $message, $code );
     214        } else {
     215            $this->expectException( $exception );
     216            if ( '' !== $message ) {
     217                $this->expectExceptionMessage( $message );
     218            }
     219            if ( null !== $code ) {
     220                $this->expectExceptionCode( $code );
     221            }
     222        }
     223    }
    203224}
Note: See TracChangeset for help on using the changeset viewer.