From 96bbe7cb4c8ab5ecd78cc65985633cec14a65839 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 7 Apr 2018 16:06:25 -0700 Subject: [PATCH] phpunit: Create class aliases for interfaces in PHPUnit 4/6 compat layer Change-Id: If36bb3403f226b0399e37d2fd63b4338b1de10ae --- tests/common/TestsAutoLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.20.1