Lines Matching refs:parser
22 $parser = new TestParser();
23 $parser->markers = [
28 $this->assertEquals("<p>Result is A</p>\n", $parser->parse('Result is [abc]'));
29 $this->assertEquals("<p>Result is B</p>\n", $parser->parse('Result is [[abc]]'));
30 $this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]'));
31 $this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]'));
33 $parser = new TestParser();
34 $parser->markers = [
39 $this->assertEquals("<p>Result is A</p>\n", $parser->parse('Result is [abc]'));
40 $this->assertEquals("<p>Result is B</p>\n", $parser->parse('Result is [[abc]]'));
41 $this->assertEquals('Result is A', $parser->parseParagraph('Result is [abc]'));
42 $this->assertEquals('Result is B', $parser->parseParagraph('Result is [[abc]]'));
47 $parser = new TestParser();
48 $parser->markers = [
52 $parser->maximumNestingLevel = 3;
53 $this->assertEquals("(C-a(C-b(C-c)))", $parser->parseParagraph('[a[b[c]]]'));
54 $parser->maximumNestingLevel = 2;
55 $this->assertEquals("(C-a(C-b[c]))", $parser->parseParagraph('[a[b[c]]]'));
56 $parser->maximumNestingLevel = 1;
57 $this->assertEquals("(C-a[b[c]])", $parser->parseParagraph('[a[b[c]]]'));
62 $parser = new TestParser();
64 $this->assertEquals("0", $parser->parseParagraph("0"));
65 $this->assertEquals("<p>0</p>\n", $parser->parse("0"));