diff options
author | Christian Schneider | 2023-03-09 14:03:35 +0100 |
---|---|---|
committer | Christian Schneider | 2023-03-09 14:03:35 +0100 |
commit | 5a1c55cfab2ff23bd39bf1e6584b7d402655c78e (patch) | |
tree | 831e88d2f3ee46b6fd28121bb87d25f009bae535 /test/it_text.t | |
parent | aa6cbf3d155f0b047321e8ea8e42d7164046b7cd (diff) | |
download | itools-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
Diffstat (limited to 'test/it_text.t')
-rwxr-xr-x | test/it_text.t | 3 |
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"); |