summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-09-22 22:09:51 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-09-22 22:09:51 +0200
commit698d87d578dfe5d2a794f75003ded834081ca738 (patch)
tree43d5ab8d0cc756683e0f32b8ae2ce918326e1624 /tests
parenta89fd7228a0889c23b12fa5845decec9c4c121c2 (diff)
downloadste-698d87d578dfe5d2a794f75003ded834081ca738.tar.gz
ste-698d87d578dfe5d2a794f75003ded834081ca738.tar.bz2
ste-698d87d578dfe5d2a794f75003ded834081ca738.zip
Allow returning a non-string (usually void) again in custom tagsHEAD2.0.1master
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/test_user_tag_returns_nothing/Test.php22
-rw-r--r--tests/functional/test_user_tag_returns_nothing/test.tpl1
-rw-r--r--tests/functional/test_user_tag_returns_nothing/want0
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/functional/test_user_tag_returns_nothing/Test.php b/tests/functional/test_user_tag_returns_nothing/Test.php
new file mode 100644
index 0000000..cd85908
--- /dev/null
+++ b/tests/functional/test_user_tag_returns_nothing/Test.php
@@ -0,0 +1,22 @@
+<?php
+
+
+namespace tests\functional\test_user_tag_returns_nothing;
+
+use tests\functional\BaseTest;
+use r7r\ste\STECore;
+
+class Test extends BaseTest
+{
+ protected function setUpSte(STECore $ste): void
+ {
+ $ste->register_tag('foobar', function ($ste, $params, $sub) {
+ // nop
+ });
+ }
+
+ protected function getDirectory(): string
+ {
+ return __DIR__;
+ }
+}
diff --git a/tests/functional/test_user_tag_returns_nothing/test.tpl b/tests/functional/test_user_tag_returns_nothing/test.tpl
new file mode 100644
index 0000000..94799a8
--- /dev/null
+++ b/tests/functional/test_user_tag_returns_nothing/test.tpl
@@ -0,0 +1 @@
+<ste:foobar /> \ No newline at end of file
diff --git a/tests/functional/test_user_tag_returns_nothing/want b/tests/functional/test_user_tag_returns_nothing/want
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/functional/test_user_tag_returns_nothing/want