Merge "Remove unused HookContainerTest method"

This commit is contained in:
jenkins-bot 2020-07-20 20:12:43 +00:00 committed by Gerrit Code Review
commit f60232cef5

View file

@ -5,7 +5,6 @@ namespace MediaWiki\HookContainer {
use Psr\Container\ContainerInterface;
use UnexpectedValueException;
use Wikimedia\ObjectFactory;
use ExtensionRegistry;
use MediaWikiUnitTestCase;
use Wikimedia\ScopedCallback;
use Wikimedia\TestingAccessWrapper;
@ -13,7 +12,7 @@ namespace MediaWiki\HookContainer {
class HookContainerTest extends MediaWikiUnitTestCase {
/*
* Creates a new hook container with mocked ObjectFactory, ExtensionRegistry, and DeprecatedHooks
* Creates a new hook container with StaticHookRegistry and mocked ObjectFactory
*/
private function newHookContainer(
$hooks = null, $deprecatedHooksArray = []
@ -32,14 +31,6 @@ namespace MediaWiki\HookContainer {
return $hookContainer;
}
private function getMockExtensionRegistry( $hooks ) {
$mockRegistry = $this->createNoOpMock( ExtensionRegistry::class, [ 'getAttribute' ] );
$mockRegistry->method( 'getAttribute' )
->with( 'Hooks' )
->willReturn( $hooks );
return $mockRegistry;
}
private function getObjectFactory() {
$mockServiceContainer = $this->createMock( ContainerInterface::class );
$mockServiceContainer->method( 'get' )