@@ 49-57 (lines=9) @@ | ||
46 | return $handlers; |
|
47 | } |
|
48 | ||
49 | public function testReplaceWithoutContentOffset() |
|
50 | { |
|
51 | $text = ' [x value=" [name]yyy[/name] "] [name]yyy[/name] [/x] '; |
|
52 | $result = ' [x value=" [name]yyy[/name] "] name [/x] '; |
|
53 | ||
54 | $processor = new Processor(new RegexParser(), $this->getHandlers()); |
|
55 | ||
56 | static::assertSame($result, $processor->process($text)); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @param string $text |
|
@@ 123-129 (lines=7) @@ | ||
120 | static::assertSame('<length><length><length>', $processor->process('[x][x][x]')); |
|
121 | } |
|
122 | ||
123 | public function testProcessorWithoutRecursion() |
|
124 | { |
|
125 | $processor = new Processor(new RegexParser(), $this->getHandlers()); |
|
126 | $text = 'x [content]a-[name][/name]-b[/content] y'; |
|
127 | ||
128 | static::assertSame('x a-[name][/name]-b y', $processor->withRecursionDepth(0)->process($text)); |
|
129 | } |
|
130 | ||
131 | public function testProcessContentIfHasChildHandlerButNotParent() |
|
132 | { |
|
@@ 143-149 (lines=7) @@ | ||
140 | static::assertSame('x [invalid ] [valid /] [/invalid] y', $processor->withAutoProcessContent(false)->process($text)); |
|
141 | } |
|
142 | ||
143 | public function testProcessorWithoutContentAutoProcessing() |
|
144 | { |
|
145 | $processor = new Processor(new RegexParser(), $this->getHandlers()); |
|
146 | $text = 'x [content]a-[name][/name]-b[/content] y'; |
|
147 | ||
148 | static::assertSame('x a-[name][/name]-b y', $processor->withAutoProcessContent(false)->process($text)); |
|
149 | } |
|
150 | ||
151 | public function testProcessorShortcodePositions() |
|
152 | { |