summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php
new file mode 100644
index 00000000..21a0a087
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Utils/StringBuilder.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace SMW\Tests\Utils;
+
+/**
+ *
+ * @group SMW
+ * @group SMWExtension
+ *
+ * @license GNU GPL v2+
+ * @since 2.0
+ */
+class StringBuilder {
+
+ private $string = '';
+
+ /**
+ * @since 2.0
+ */
+ public function addnewLine() {
+ $this->string = $this->string . "\n";
+ return $this;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public function addString( $string ) {
+ $this->string = $this->string . $string;
+ return $this;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public function getString() {
+ $string = $this->string;
+ $this->string = '';
+ return $string;
+ }
+
+}