w/s changes
[lhc/web/wiklou.git] / maintenance / tests / ExtraParserTest.php
1 <?php
2 /**
3 * Parser-related tests that don't suit for parserTests.txt
4 */
5
6 class ExtraParserTest extends PHPUnit_Framework_TestCase {
7
8 function setUp() {
9 global $wgMemc;
10
11 $wgMemc = new FakeMemCachedClient;
12 }
13
14 function tearDown() {
15 global $wgMemc;
16
17 $wgMemc = null;
18 }
19
20 // Bug 8689 - Long numeric lines kill the parser
21 function testBug8689() {
22 $longLine = '1.' . str_repeat( '1234567890', 100000 ) . "\n";
23
24 $parser = new Parser();
25 $t = Title::newFromText( 'Unit test' );
26 $options = new ParserOptions();
27 $this->assertEquals( "<p>$longLine</p>",
28 $parser->parse( $longLine, $t, $options )->getText() );
29 }
30 }