From 5a1c55cfab2ff23bd39bf1e6584b7d402655c78e Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 9 Mar 2023 14:03:35 +0100 Subject: Also add test for values from GLOBALS, also makes test resistant against global variable from e.g. auto_prepend.php --- test/it_text.t | 3 +++ 1 file changed, 3 insertions(+) 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"); -- cgit v1.2.3