mirror of
				https://github.com/diocloid/LinkTitles.git
				synced 2025-10-22 05:42:32 +02:00 
			
		
		
		
	Fix tests.
This commit is contained in:
		@@ -71,7 +71,8 @@ class ExtensionTest extends LinkTitles\TestCase {
 | 
			
		||||
		] );
 | 
			
		||||
		$title = $this->insertPage( 'test page', $input )['title'];
 | 
			
		||||
		$page = new WikiPage( $title );
 | 
			
		||||
		$output = $page->getParserOutput( new ParserOptions(), null, true );
 | 
			
		||||
		$user = MediaWiki\User\UserFactory::newAnonymous();
 | 
			
		||||
		$output = $page->getParserOutput( new ParserOptions( $user ), null, true );
 | 
			
		||||
		$lines = explode( "\n", $output->getText() );
 | 
			
		||||
		$this->assertRegexp( $expectedOutput, $lines[0] );
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -318,7 +318,7 @@ class LinkTitlesLinkerTest extends LinkTitles\TestCase {
 | 
			
		||||
		// Reset namespace caches.
 | 
			
		||||
		// See https://stackoverflow.com/q/45974979/270712
 | 
			
		||||
		\MWNamespace::getCanonicalNamespaces(true);
 | 
			
		||||
		global $wgContLang;
 | 
			
		||||
		$wgContLang = \MediaWiki\MediaWikiServices::getInstance()->getContentLanguage();
 | 
			
		||||
		$wgContLang->resetNamespaces();
 | 
			
		||||
		$this->assertTrue( MWNamespace::exists( $ns ), "The namespace with id $ns should exist!" );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user