From: Kunal Mehta Date: Sat, 7 Apr 2018 23:06:25 +0000 (-0700) Subject: phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer X-Git-Tag: 1.31.0-rc.0~150^2~3 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=96bbe7cb4c8ab5ecd78cc65985633cec14a65839 phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer Change-Id: If36bb3403f226b0399e37d2fd63b4338b1de10ae --- diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php index b626063009..eef7e90d5c 100644 --- a/tests/common/TestsAutoLoader.php +++ b/tests/common/TestsAutoLoader.php @@ -211,7 +211,7 @@ spl_autoload_register( function ( $class ) { $newForm = str_replace( '_', '\\', $class ); } - if ( class_exists( $newForm ) ) { + if ( class_exists( $newForm ) || interface_exists( $newForm ) ) { // If the new class name exists, alias // the old name to it. class_alias( $newForm, $class );