mirror of
				https://github.com/diocloid/LinkTitles.git
				synced 2025-10-22 05:42:32 +02:00 
			
		
		
		
	Add test case for issue #39.
This commit is contained in:
		@@ -85,6 +85,21 @@ class LinkTitlesLinkerTest extends LinkTitles\TestCase {
 | 
			
		||||
		];
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test issue #39, https://github.com/bovender/LinkTitles/issues/39
 | 
			
		||||
	 */
 | 
			
		||||
	public function testNoautolinks() {
 | 
			
		||||
		$config = new LinkTitles\Config();
 | 
			
		||||
		$config->firstOnly = false;
 | 
			
		||||
		LinkTitles\Splitter::invalidate();
 | 
			
		||||
		$input = 'This is a text with <noautolinks><nowiki>link target</nowiki></noautolinks>';
 | 
			
		||||
		$source = LinkTitles\Source::createFromTitleAndText( $this->title, $input, $config );
 | 
			
		||||
		$linker = new LinkTitles\Linker( $config );
 | 
			
		||||
		$result = $linker->linkContent( $source );
 | 
			
		||||
		if ( !$result ) { $result = $input; }
 | 
			
		||||
		$this->assertSame( $input, $result );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @dataProvider provideLinkContentTemplatesData
 | 
			
		||||
	 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user