summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php')
-rw-r--r--www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php b/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php
new file mode 100644
index 00000000..ac00d67c
--- /dev/null
+++ b/www/wiki/extensions/SemanticResultFormats/tests/phpunit/Unit/Outline/TemplateBuilderTest.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace SRF\Tests\Outline;
+
+use SRF\Outline\TemplateBuilder;
+use SRF\Outline\OutlineTree;
+
+/**
+ * @covers \SRF\Outline\TemplateBuilder
+ * @group semantic-result-formats
+ *
+ * @license GNU GPL v2+
+ * @since 3.1
+ *
+ * @author mwjames
+ */
+class TemplateBuilderTest extends \PHPUnit_Framework_TestCase {
+
+ public function testCanConstruct() {
+
+ $this->assertInstanceOf(
+ TemplateBuilder::class,
+ new TemplateBuilder( [] )
+ );
+ }
+
+ public function testBuildForEmptyTree() {
+
+ $params = [
+ 'outlineproperties' => [ 'Foo' ],
+ 'template' => 'Bar',
+ 'userparam' => ''
+ ];
+
+ $instance = new TemplateBuilder( $params );
+
+ $this->assertInternalType(
+ 'string',
+ $instance->build( new OutlineTree() )
+ );
+ }
+
+}