Browse Source

adds deep copy test

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1379 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.1
Xuefer 7 years ago
parent
commit
1ca0e24ee3
2 changed files with 26 additions and 0 deletions
  1. +15
    -0
      tests/xcache_deep_copy_arg_info.phpt
  2. +11
    -0
      tests/xcache_deep_copy_static_variables.phpt

+ 15
- 0
tests/xcache_deep_copy_arg_info.phpt View File

@ -0,0 +1,15 @@
--TEST--
xcache requires deep copying arg info
--INI--
xcache.readonly_protection=0
--FILE--
<?php
function a($a = 1) {
echo $a;
}
a();
a(2);
echo PHP_EOL;
?>
--EXPECT--
12

+ 11
- 0
tests/xcache_deep_copy_static_variables.phpt View File

@ -0,0 +1,11 @@
--TEST--
xcache requires deep copying static variables in shallow copy mode
--INI--
xcache.readonly_protection=0
--FILE--
<?php
static $a = array(1);
echo $a[0], PHP_EOL;
?>
--EXPECT--
1

Loading…
Cancel
Save