summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2023-03-09 14:03:35 +0100
committerChristian Schneider2023-03-09 14:03:35 +0100
commit5a1c55cfab2ff23bd39bf1e6584b7d402655c78e (patch)
tree831e88d2f3ee46b6fd28121bb87d25f009bae535
parentaa6cbf3d155f0b047321e8ea8e42d7164046b7cd (diff)
downloaditools-5a1c55cfab2ff23bd39bf1e6584b7d402655c78e.tar.gz
itools-5a1c55cfab2ff23bd39bf1e6584b7d402655c78e.tar.bz2
itools-5a1c55cfab2ff23bd39bf1e6584b7d402655c78e.zip
Also add test for values from GLOBALS, also makes test resistant against global variable from e.g. auto_prepend.php
-rwxr-xr-xtest/it_text.t3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/it_text.t b/test/it_text.t
index 6726996..bbf727b 100755
--- a/test/it_text.t
+++ b/test/it_text.t
@@ -8,6 +8,9 @@ $obj->y->z = "attr";
is(it_text::transmogrify(""), "");
is(it_text::transmogrify("foo"), "foo");
+$GLOBALS['foo'] = 'bar';
+is(it_text::transmogrify("{foo}"), "bar"); # Value from GLOBALS
+$GLOBALS['foo'] = '';
is(it_text::transmogrify("{foo}"), "");
is(it_text::transmogrify("{foo}", array('foo' => 1)), "1");
is(it_text::transmogrify("{foo}{foo}", array('foo' => 1)), "11");