+ public function test_multi_source_elem_whole_document_with_nested_content_origin()
+ {
+ $this->runParserTest(
+ '<p><strong>{{@45}}</strong></p>',
+ ['45' => '<p>Testing</p><blockquote>This</blockquote>'],
+ '<p>Testing</p><blockquote>This</blockquote>',
+ );
+ }
+
+ public function test_multiple_tags_in_same_origin_with_inline_content()
+ {
+ $this->runParserTest(
+ '<p>This {{@45#content}}{{@45#content}} content is {{@45#content}}</p>',
+ ['45' => '<p id="content">inline</p>'],
+ '<p>This inlineinline content is inline</p>',
+ );
+ }
+
+ public function test_multiple_tags_in_same_origin_with_block_content()
+ {
+ $this->runParserTest(
+ '<p>This {{@45#content}}{{@45#content}} content is {{@45#content}}</p>',
+ ['45' => '<pre id="content">block</pre>'],
+ '<p>This </p><pre id="content">block</pre><pre id="content">block</pre><p> content is </p><pre id="content">block</pre>',
+ );
+ }
+
+ public function test_multiple_tags_in_differing_origin_levels_with_block_content()
+ {
+ $this->runParserTest(
+ '<div><p>This <strong>{{@45#content}}</strong> content is {{@45#content}}</p>{{@45#content}}</div>',
+ ['45' => '<pre id="content">block</pre>'],
+ '<div><pre id="content">block</pre><p>This content is </p><pre id="content">block</pre><pre id="content">block</pre></div>',
+ );
+ }
+
+ public function test_multiple_tags_in_shallow_origin_with_multi_block_content()
+ {
+ $this->runParserTest(
+ '<p>{{@45}}C{{@45}}</p><div>{{@45}}{{@45}}</div>',
+ ['45' => '<p>A</p><p>B</p>'],
+ '<p>A</p><p>B</p><p>C</p><p>A</p><p>B</p><div><p>A</p><p>B</p><p>A</p><p>B</p></div>',
+ );
+ }
+
+ protected function runParserTest(string $html, array $contentById, string $expected): void