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
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 ) );
}
}