diff options
author | Christian Schneider | 2019-09-02 17:14:43 +0200 |
---|---|---|
committer | Christian Schneider | 2019-09-02 17:14:43 +0200 |
commit | 2b13737e9299317c865f72f4a276ea0b733c4f5f (patch) | |
tree | b800cc0e889d976ba0957e168df45622aee24ee2 /test/it.t | |
parent | b422951038a66713c18ec4d24ce71a13dd0756a6 (diff) | |
download | itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.tar.gz itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.tar.bz2 itools-2b13737e9299317c865f72f4a276ea0b733c4f5f.zip |
Make itools a bit stricter, new PHP versions start to enforce more declarations
Diffstat (limited to 'test/it.t')
-rwxr-xr-x | test/it.t | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -445,7 +445,8 @@ is(it::map('5*$k+$v', array(0 => 1, 1 => 2)), array(1, 7)); is(it::map(function($k, $v) {return 5*$k+$v;}, array(0 => 1, 1 => 2)), array(1, 7)); is(it::map('strlen', array("aaa", "aa")), array(3, 2)); is(it::map('it::ucfirst', array("aaa")), array("Aaa")); -is(it::map('$v->C14N()', DOMDocument::loadXML('<foo>42</foo>')->childNodes), [ '<foo>42</foo>' ], "Traversable: Needs copy, not modifiable in-place"); +($dom = new DOMDocument)->loadXML('<foo>42</foo>'); +is(it::map('$v->C14N()', $dom->childNodes), [ '<foo>42</foo>' ], "Traversable: Needs copy, not modifiable in-place"); # Special values which are not callable is(it::map('null', array("aaa", "aa")), array(null, null)); is(it::map('1', array("aaa", "aa")), array(1, 1)); |