Page MenuHomePhabricator

Add a way for extension tests to mock/force-set ExtensionRegistry attributes
Closed, ResolvedPublic

Description

So ConfirmEdit doesn't have to do it's super hacky stuff:

		$registry = new ExtensionRegistry();
		$class = new ReflectionClass( 'ExtensionRegistry' );
		$instanceProperty = $class->getProperty( 'instance' );
		$instanceProperty->setAccessible( true );
		$instanceProperty->setValue( $registry );
		$method = $class->getMethod( 'exportExtractedData' );
		$method->setAccessible( true );
		$method->invokeArgs( $registry, [ $info ] );

Details