Merge "Revert "tests: Special page constructor are not allow to call getContext""
This commit is contained in:
commit
676747b51f
1 changed files with 0 additions and 11 deletions
|
|
@ -3,7 +3,6 @@
|
|||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Permissions\UltimateAuthority;
|
||||
use MediaWiki\User\UserIdentityValue;
|
||||
use Wikimedia\TestingAccessWrapper;
|
||||
|
||||
/**
|
||||
* Test that runs against all registered special pages to make sure that regular
|
||||
|
|
@ -41,16 +40,6 @@ class SpecialPageFatalTest extends MediaWikiIntegrationTestCase {
|
|||
$this->markTestSkipped( "Could not create special page $name" );
|
||||
}
|
||||
|
||||
// Assert that the global context is not used,
|
||||
// can have side effects on Special:SpecialPages
|
||||
$assertPage = TestingAccessWrapper::newFromObject( $page );
|
||||
if ( $assertPage->mContext !== null ) {
|
||||
// Does not call assertNull, because that prints the whole object
|
||||
// and building message is also expensive
|
||||
$this->fail( get_class( $page ) . '::__construct is not safe to call SpecialPage::getContext()' .
|
||||
' (possible indirectly by other get*() functions)' );
|
||||
}
|
||||
|
||||
$executor = new SpecialPageExecutor();
|
||||
$authority = new UltimateAuthority( new UserIdentityValue( 0, 'UTSysop' ) );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue