Skip to content

Commit

Permalink
Made test compatible with O+
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Mar 16, 2013
1 parent 92430bc commit e964114
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Zend/tests/bug55156.phpt
Original file line number Diff line number Diff line change
@@ -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--
<?php

Expand Down
2 changes: 2 additions & 0 deletions Zend/tests/ns_026.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
026: Name ambiguity (class name & namespace name)
--INI--
opcache.optimization_level=0
--FILE--
<?php
namespace Foo;
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/create_new_and_modify.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ $sig1 = $phar->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");

Expand Down
9 changes: 9 additions & 0 deletions ext/phar/tests/delete_in_phar.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ $files = array();
$files['a.php'] = '<?php echo "This is a\n"; ?>';
$files['b.php'] = '<?php echo "This is b\n"; ?>';
$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';

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';
Expand Down
9 changes: 9 additions & 0 deletions ext/phar/tests/delete_in_phar_confirm.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ $files = array();
$files['a.php'] = '<?php echo "This is a\n"; ?>';
$files['b.php'] = '<?php echo "This is b\n"; ?>';
$files['b/c.php'] = '<?php echo "This is b/c\n"; ?>';

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';
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/tar/create_new_and_modify.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/tar/delete_in_phar.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ $phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$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';
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/tar/delete_in_phar_confirm.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ $phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$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';
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/zip/create_new_and_modify.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/zip/delete_in_phar.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ $phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$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';
Expand Down
8 changes: 8 additions & 0 deletions ext/phar/tests/zip/delete_in_phar_confirm.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ $phar['b/c.php'] = '<?php echo "This is b/c\n"; ?>';
$phar->setStub('<?php __HALT_COMPILER(); ?>');
$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';
Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/005.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
ReflectionMethod::getDocComment() uses wrong comment block
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/009.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
ReflectionFunction basic tests
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/025.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
ReflectionFunction basic tests
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/ReflectionClass_getDocComment_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ReflectionClass::getDocComment()
--CREDITS--
Robin Fernandes <[email protected]>
Steve Seear <[email protected]>
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ReflectionFunction::getDocComment()
--CREDITS--
Robin Fernandes <[email protected]>
Steve Seear <[email protected]>
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
ReflectionMethod::getDocComment()
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php
/**
Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/ReflectionProperty_basic2.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
Test usage of ReflectionProperty methods isDefault(), getModifiers(), getDeclaringClass() and getDocComment().
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
Test ReflectionProperty::getDocComment() usage.
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
3 changes: 3 additions & 0 deletions ext/reflection/tests/bug36308.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
Reflection Bug #36308 (ReflectionProperty::getDocComment() does not reflect extended class commentary)
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php
class Base {
Expand Down
1 change: 1 addition & 0 deletions run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function verify_config()
'ignore_repeated_errors=0',
'precision=14',
'memory_limit=128M',
'opcache.fast_shutdown=0',
);

function write_information($show_html)
Expand Down
2 changes: 2 additions & 0 deletions tests/output/ob_017.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
output buffering - stati
--INI--
opcache.optimization_level=0
--FILE--
<?php
$stati = array();
Expand Down
2 changes: 2 additions & 0 deletions tests/output/ob_start_basic_004.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
ob_start() chunk_size: confirm buffer is flushed after any output call that causes its length to equal or exceed chunk_size.
--INI--
opcache.optimization_level=0
--FILE--
<?php
/*
Expand Down

0 comments on commit e964114

Please sign in to comment.