1<?php
2
3use dokuwiki\Parsing\Parser;
4
5require_once DOKU_INC . 'inc/parser/parser.php';
6require_once DOKU_INC . 'inc/parser/handler.php';
7if (!defined('DOKU_PARSER_EOL')) define('DOKU_PARSER_EOL', "\n");   // add this to make handling test cases simpler
8
9abstract class TestOfDoku_Parser extends DokuWikiTest {
10
11    /** @var  Parser */
12    protected $P;
13    /** @var  Doku_Handler */
14    protected $H;
15
16    function setUp() : void {
17        parent::setUp();
18        $this->H = new Doku_Handler();
19        $this->P = new Parser($this->H);
20    }
21
22    function tearDown() : void {
23        unset($this->P);
24        unset($this->H);
25    }
26}
27
28function stripByteIndex($call) {
29    unset($call[2]);
30    if ($call[0] == "nest") {
31      $call[1][0] = array_map('stripByteIndex',$call[1][0]);
32    }
33    return $call;
34}
35