diff options
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/parser.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/textformatter/s9e/renderer.php | 10 | ||||
-rw-r--r-- | tests/text_formatter/s9e/parser_test.php | 7 | ||||
-rw-r--r-- | tests/text_formatter/s9e/renderer_test.php | 7 |
4 files changed, 34 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php index ab81a0ab4f..fb6ef03c1c 100644 --- a/phpBB/phpbb/textformatter/s9e/parser.php +++ b/phpBB/phpbb/textformatter/s9e/parser.php @@ -242,6 +242,16 @@ class parser implements \phpbb\textformatter\parser_interface } /** + * Return the instance of s9e\TextFormatter\Parser used by this object + * + * @return \s9e\TextFormatter\Parser + */ + public function get_parser() + { + return $this->parser; + } + + /** * {@inheritdoc} */ public function set_var($name, $value) diff --git a/phpBB/phpbb/textformatter/s9e/renderer.php b/phpBB/phpbb/textformatter/s9e/renderer.php index 28498150b3..02461b3849 100644 --- a/phpBB/phpbb/textformatter/s9e/renderer.php +++ b/phpBB/phpbb/textformatter/s9e/renderer.php @@ -164,6 +164,16 @@ class renderer implements \phpbb\textformatter\renderer_interface } /** + * Return the instance of s9e\TextFormatter\Renderer used by this object + * + * @return \s9e\TextFormatter\Renderer + */ + public function get_renderer() + { + return $this->renderer; + } + + /** * {@inheritdoc} */ public function get_viewcensors() diff --git a/tests/text_formatter/s9e/parser_test.php b/tests/text_formatter/s9e/parser_test.php index 74182bda47..2904df25b4 100644 --- a/tests/text_formatter/s9e/parser_test.php +++ b/tests/text_formatter/s9e/parser_test.php @@ -260,4 +260,11 @@ class phpbb_textformatter_s9e_parser_test extends phpbb_test_case && isset($vars['xml']) && $vars['xml'] === '<t>...</t>'; } + + public function test_get_parser() + { + $container = $this->get_test_case_helpers()->set_s9e_services(); + $parser = $container->get('text_formatter.parser'); + $this->assertInstanceOf('s9e\\TextFormatter\\Parser', $parser->get_parser()); + } } diff --git a/tests/text_formatter/s9e/renderer_test.php b/tests/text_formatter/s9e/renderer_test.php index c69a93dbc1..8835a80d9d 100644 --- a/tests/text_formatter/s9e/renderer_test.php +++ b/tests/text_formatter/s9e/renderer_test.php @@ -443,4 +443,11 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case && isset($vars['self']) && $vars['self'] instanceof \phpbb\textformatter\s9e\renderer; } + + public function test_get_renderer() + { + $container = $this->get_test_case_helpers()->set_s9e_services(); + $renderer = $container->get('text_formatter.renderer'); + $this->assertInstanceOf('s9e\\TextFormatter\\Renderer', $renderer->get_renderer()); + } } |