From e9641141aaad136757af06fddd6d870147ac2000 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Sat, 16 Mar 2013 16:11:00 +0400 Subject: [PATCH] Made test compatible with O+ --- Zend/tests/bug55156.phpt | 3 +++ Zend/tests/ns_026.phpt | 2 ++ ext/phar/tests/create_new_and_modify.phpt | 8 ++++++++ ext/phar/tests/delete_in_phar.phpt | 9 +++++++++ ext/phar/tests/delete_in_phar_confirm.phpt | 9 +++++++++ ext/phar/tests/tar/create_new_and_modify.phpt | 8 ++++++++ ext/phar/tests/tar/delete_in_phar.phpt | 8 ++++++++ ext/phar/tests/tar/delete_in_phar_confirm.phpt | 8 ++++++++ ext/phar/tests/zip/create_new_and_modify.phpt | 8 ++++++++ ext/phar/tests/zip/delete_in_phar.phpt | 8 ++++++++ ext/phar/tests/zip/delete_in_phar_confirm.phpt | 8 ++++++++ ext/reflection/tests/005.phpt | 3 +++ ext/reflection/tests/009.phpt | 3 +++ ext/reflection/tests/025.phpt | 3 +++ .../tests/ReflectionClass_getDocComment_001.phpt | 3 +++ .../tests/ReflectionFunction_getDocComment.001.phpt | 3 +++ .../tests/ReflectionMethod_getDocComment_basic.phpt | 3 +++ ext/reflection/tests/ReflectionProperty_basic2.phpt | 3 +++ .../tests/ReflectionProperty_getDocComment_basic.phpt | 3 +++ ext/reflection/tests/bug36308.phpt | 3 +++ run-tests.php | 1 + tests/output/ob_017.phpt | 2 ++ tests/output/ob_start_basic_004.phpt | 2 ++ 23 files changed, 111 insertions(+) diff --git a/Zend/tests/bug55156.phpt b/Zend/tests/bug55156.phpt index 6c0ff768d1..7d75ce3e94 100644 --- a/Zend/tests/bug55156.phpt +++ b/Zend/tests/bug55156.phpt @@ -1,5 +1,8 @@ --TEST-- Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none) +--INI-- +opcache.save_comments=1 +opcache.load_comments=1 --FILE-- getSignature(); include $pname . '/a.php'; +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + file_put_contents($pname .'/a.php', "modified!\n"); file_put_contents($pname .'/b.php', "another!\n"); diff --git a/ext/phar/tests/delete_in_phar.phpt b/ext/phar/tests/delete_in_phar.phpt index 4842d27913..d28f136f77 100644 --- a/ext/phar/tests/delete_in_phar.phpt +++ b/ext/phar/tests/delete_in_phar.phpt @@ -15,6 +15,15 @@ $files = array(); $files['a.php'] = ''; $files['b.php'] = ''; $files['b/c.php'] = ''; + +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include 'files/phar_test.inc'; include $pname . '/a.php'; diff --git a/ext/phar/tests/delete_in_phar_confirm.phpt b/ext/phar/tests/delete_in_phar_confirm.phpt index 13a8d0db29..0d4eb1e2aa 100644 --- a/ext/phar/tests/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/delete_in_phar_confirm.phpt @@ -15,6 +15,15 @@ $files = array(); $files['a.php'] = ''; $files['b.php'] = ''; $files['b/c.php'] = ''; + +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include 'files/phar_test.inc'; include $pname . '/a.php'; diff --git a/ext/phar/tests/tar/create_new_and_modify.phpt b/ext/phar/tests/tar/create_new_and_modify.phpt index 8062fda769..905bfabc82 100644 --- a/ext/phar/tests/tar/create_new_and_modify.phpt +++ b/ext/phar/tests/tar/create_new_and_modify.phpt @@ -15,6 +15,14 @@ $pname = 'phar://' . $fname; file_put_contents($pname . '/a.php', "brand new!\n"); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + $phar = new Phar($fname); var_dump($phar->isFileFormat(Phar::TAR)); $sig1 = md5_file($fname); diff --git a/ext/phar/tests/tar/delete_in_phar.phpt b/ext/phar/tests/tar/delete_in_phar.phpt index 91ef4a2046..1982b6bda9 100644 --- a/ext/phar/tests/tar/delete_in_phar.phpt +++ b/ext/phar/tests/tar/delete_in_phar.phpt @@ -18,6 +18,14 @@ $phar['b/c.php'] = ''; $phar->setStub(''); $phar->stopBuffering(); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include $alias . '/a.php'; include $alias . '/b.php'; include $alias . '/b/c.php'; diff --git a/ext/phar/tests/tar/delete_in_phar_confirm.phpt b/ext/phar/tests/tar/delete_in_phar_confirm.phpt index 707bcbd0ed..7593ebc1fb 100644 --- a/ext/phar/tests/tar/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/tar/delete_in_phar_confirm.phpt @@ -18,6 +18,14 @@ $phar['b/c.php'] = ''; $phar->setStub(''); $phar->stopBuffering(); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include $alias . '/a.php'; include $alias . '/b.php'; include $alias . '/b/c.php'; diff --git a/ext/phar/tests/zip/create_new_and_modify.phpt b/ext/phar/tests/zip/create_new_and_modify.phpt index 5a3ec3317b..55d69cca0e 100644 --- a/ext/phar/tests/zip/create_new_and_modify.phpt +++ b/ext/phar/tests/zip/create_new_and_modify.phpt @@ -15,6 +15,14 @@ $pname = 'phar://' . $fname; file_put_contents($pname . '/a.php', "brand new!\n"); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + $phar = new Phar($fname); var_dump($phar->isFileFormat(Phar::ZIP)); $sig1 = md5_file($fname); diff --git a/ext/phar/tests/zip/delete_in_phar.phpt b/ext/phar/tests/zip/delete_in_phar.phpt index b7bda7ca4b..f01280013f 100644 --- a/ext/phar/tests/zip/delete_in_phar.phpt +++ b/ext/phar/tests/zip/delete_in_phar.phpt @@ -18,6 +18,14 @@ $phar['b/c.php'] = ''; $phar->setStub(''); $phar->stopBuffering(); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include $alias . '/a.php'; include $alias . '/b.php'; include $alias . '/b/c.php'; diff --git a/ext/phar/tests/zip/delete_in_phar_confirm.phpt b/ext/phar/tests/zip/delete_in_phar_confirm.phpt index fdd0b42b5c..0080499177 100644 --- a/ext/phar/tests/zip/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/zip/delete_in_phar_confirm.phpt @@ -18,6 +18,14 @@ $phar['b/c.php'] = ''; $phar->setStub(''); $phar->stopBuffering(); +if (function_exists("opcache_get_status")) { + $status = opcache_get_status(); + if ($status["opcache_enabled"]) { + ini_set("opcache.revalidate_freq", "0"); + sleep(2); + } +} + include $alias . '/a.php'; include $alias . '/b.php'; include $alias . '/b/c.php'; diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt index f337e44ae6..e257699b6f 100644 --- a/ext/reflection/tests/005.phpt +++ b/ext/reflection/tests/005.phpt @@ -1,5 +1,8 @@ --TEST-- ReflectionMethod::getDocComment() uses wrong comment block +--INI-- +opcache.save_comments=1 +opcache.load_comments=1 --FILE-- +--INI-- +opcache.save_comments=1 +opcache.load_comments=1 --FILE-- Steve Seear +--INI-- +opcache.save_comments=1 +opcache.load_comments=1 --FILE-- Steve Seear +--INI-- +opcache.save_comments=1 +opcache.load_comments=1 --FILE--