aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php10
-rw-r--r--phpBB/phpbb/textformatter/s9e/renderer.php10
-rw-r--r--tests/text_formatter/s9e/parser_test.php8
-rw-r--r--tests/text_formatter/s9e/renderer_test.php7
4 files changed, 35 insertions, 0 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 8e78a18d40..b717dea962 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -192,6 +192,16 @@ class parser extends \phpbb\textformatter\parser
}
/**
+ * 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 3ec5f38029..3ccb40cc2d 100644
--- a/phpBB/phpbb/textformatter/s9e/renderer.php
+++ b/phpBB/phpbb/textformatter/s9e/renderer.php
@@ -122,6 +122,16 @@ class renderer extends \phpbb\textformatter\renderer
}
/**
+ * 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 09af6c22ad..a3c86e8350 100644
--- a/tests/text_formatter/s9e/parser_test.php
+++ b/tests/text_formatter/s9e/parser_test.php
@@ -7,6 +7,7 @@
*
*/
require_once __DIR__ . '/../../../phpBB/includes/functions.php';
+require_once __DIR__ . '/../../../phpBB/includes/functions_content.php';
require_once __DIR__ . '/../../mock/user.php';
require_once __DIR__ . '/../../mock/cache.php';
@@ -164,4 +165,11 @@ class phpbb_textformatter_s9e_parser_test extends phpbb_test_case
)
);
}
+
+ 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 fbf17c8f68..486b17d03f 100644
--- a/tests/text_formatter/s9e/renderer_test.php
+++ b/tests/text_formatter/s9e/renderer_test.php
@@ -353,4 +353,11 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
);
}
}
+
+ 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());
+ }
}