Browse Source

adds tests for shallow copy

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1384 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.1
Xuefer 7 years ago
parent
commit
f46ace6822
2 changed files with 23 additions and 0 deletions
  1. +9
    -0
      tests/xcache_deep_copy_opcodes_for_const.phpt
  2. +14
    -0
      tests/xcache_shallow_copy_check_early_binding.phpt

+ 9
- 0
tests/xcache_deep_copy_opcodes_for_const.phpt View File

@ -0,0 +1,9 @@
--TEST--
xcache requires deep copying opcodes for __FILE__ and __DIR__
--INI--
--FILE--
<?php
echo __FILE__, PHP_EOL;
?>
--EXPECTF--
%sxcache_deep_copy_opcodes_for_const%s

+ 14
- 0
tests/xcache_shallow_copy_check_early_binding.phpt View File

@ -0,0 +1,14 @@
--TEST--
xcache shallow copying precondition: early binding changes constant inside opcode for PHP5.2-
--SKIPIF--
<?php
if (version_compare(PHP_VERSION, "5.3", ">=")) {
die("skip only needed for PHP 5.2 or less");
}
?>
--FILE--
<?php
class A extends Exception {
}
?>
--EXPECT--

Loading…
Cancel
Save