From d5bbd8cc629d6b1720800a3970a87bd77ac4d958 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 17 May 2018 22:30:58 -0700 Subject: [PATCH] Fix improper parameters to ReflectionMethod::invoke The first argument to the function is supposed to be an object, or null if the method is static. Otherwise on PHP 7.2 the tests fail with: ReflectionMethod::invoke() expects parameter 1 to be object, string given Change-Id: I7002be5809f9dfbee0788907fe85139d05c0e1fc --- .../resourceloader/ResourceLoaderLessVarFileModuleTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php index a42e4bed25..bb51de07d7 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php @@ -38,6 +38,6 @@ class ResourceLoaderLessVarFileModuleTest extends ResourceLoaderTestCase { public function testEscapeMessage( $msg, $expected ) { $method = new ReflectionMethod( ResourceLoaderLessVarFileModule::class, 'wrapAndEscapeMessage' ); $method->setAccessible( true ); - $this->assertEquals( $expected, $method->invoke( ResourceLoaderLessVarFileModule::class, $msg ) ); + $this->assertEquals( $expected, $method->invoke( null, $msg ) ); } } -- 2.20.1