From: Kunal Mehta Date: Fri, 18 May 2018 05:30:58 +0000 (-0700) Subject: Fix improper parameters to ReflectionMethod::invoke X-Git-Tag: 1.34.0-rc.0~5404^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=d5bbd8cc629d6b1720800a3970a87bd77ac4d958;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) ); } }