diff options
| author | andy wharmby <wharmby@php.net> | 2009-08-27 19:30:35 +0000 |
|---|---|---|
| committer | andy wharmby <wharmby@php.net> | 2009-08-27 19:30:35 +0000 |
| commit | b5145cb74d6eaa50b0550209d695da536a8cabd4 (patch) | |
| tree | d5b79a77f215b3a7dead160fc20b1eeabefb6849 | |
| parent | 9ea28dd3656a477cadc0dcd24ad2fbd7d78dae53 (diff) | |
| download | php-git-b5145cb74d6eaa50b0550209d695da536a8cabd4.tar.gz | |
Fix time_sleep_until() tests; not supported on Windows on 5.2
| -rw-r--r-- | ext/standard/tests/misc/time_sleep_until_basic.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/misc/time_sleep_until_error1.phpt | 6 | ||||
| -rw-r--r-- | ext/standard/tests/misc/time_sleep_until_error3.phpt | 6 | ||||
| -rw-r--r-- | tests/func/time_sleep_until_basic.phpt | 13 | ||||
| -rw-r--r-- | tests/func/time_sleep_until_error2.phpt | 12 |
5 files changed, 37 insertions, 6 deletions
diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt index 7f2f32d243..ea9d53edf3 100644 --- a/ext/standard/tests/misc/time_sleep_until_basic.phpt +++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt @@ -1,5 +1,9 @@ --TEST-- time_sleep_until() function - basic test for time_sleep_until() +--SKIPIF-- +<?php + function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); +?> --CREDITS-- Manuel Baldassarri mb@ideato.it Michele Orselli mo@ideato.it @@ -10,5 +14,7 @@ Michele Orselli mo@ideato.it time_sleep_until( $time ); var_dump( time() >= $time ); ?> +===DONE=== --EXPECT-- bool(true) +===DONE=== diff --git a/ext/standard/tests/misc/time_sleep_until_error1.phpt b/ext/standard/tests/misc/time_sleep_until_error1.phpt index 9752fd70e3..30cb23f306 100644 --- a/ext/standard/tests/misc/time_sleep_until_error1.phpt +++ b/ext/standard/tests/misc/time_sleep_until_error1.phpt @@ -1,5 +1,9 @@ --TEST-- time_sleep_until() function - error test for time_sleep_until() +--SKIPIF-- +<?php + function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); +?> --CREDITS-- Fabio Fabbrucci fabbrucci@grupporetina.com Danilo Sanchi sanchi@grupporetina.com @@ -8,6 +12,8 @@ Danilo Sanchi sanchi@grupporetina.com <?php var_dump(time_sleep_until(time()-1)); ?> +===DONE=== --EXPECTF-- Warning: time_sleep_until(): Sleep until to time is less than current time in %s on line 2 bool(false) +===DONE=== diff --git a/ext/standard/tests/misc/time_sleep_until_error3.phpt b/ext/standard/tests/misc/time_sleep_until_error3.phpt index 64489618ae..8305b1cfff 100644 --- a/ext/standard/tests/misc/time_sleep_until_error3.phpt +++ b/ext/standard/tests/misc/time_sleep_until_error3.phpt @@ -1,5 +1,9 @@ --TEST-- time_sleep_until() function - error test for time_sleep_until() +--SKIPIF-- +<?php + function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); +?> --CREDITS-- Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 @@ -7,6 +11,8 @@ Francesco Fullone ff@ideato.it <?php var_dump(time_sleep_until()); ?> +===DONE=== --EXPECTF-- Warning: time_sleep_until() expects exactly 1 parameter, 0 given in %s on line 2 NULL +===DONE=== diff --git a/tests/func/time_sleep_until_basic.phpt b/tests/func/time_sleep_until_basic.phpt index def114cc48..91b0e8a43b 100644 --- a/tests/func/time_sleep_until_basic.phpt +++ b/tests/func/time_sleep_until_basic.phpt @@ -1,5 +1,9 @@ --TEST-- -time_sleep_until — Make the script sleep until the specified time +time_sleep_until() : Make the script sleep until the specified time +--SKIPIF-- +<?php + function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); +?> --CREDITS-- Àlex Corretgé - alex@corretge.cat --FILE-- @@ -8,8 +12,11 @@ time_sleep_until — Make the script sleep until the specified time $timeA = time(); time_sleep_until($timeA+3); $timeB = time(); -echo ($timeB - $timeA) . " seconds."; +echo ($timeB - $timeA) . " seconds.\n"; ?> +===DONE=== --EXPECT-- -3 seconds.
\ No newline at end of file +3 seconds. +===DONE=== +
\ No newline at end of file diff --git a/tests/func/time_sleep_until_error2.phpt b/tests/func/time_sleep_until_error2.phpt index bb999b9bef..b98f366fd6 100644 --- a/tests/func/time_sleep_until_error2.phpt +++ b/tests/func/time_sleep_until_error2.phpt @@ -1,5 +1,9 @@ --TEST-- -time_sleep_until — Make the script sleep until the specified time +time_sleep_until() : Make the script sleep until the specified time +--SKIPIF-- +<?php + function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); +?> --CREDITS-- Àlex Corretgé - alex@corretge.cat --FILE-- @@ -8,9 +12,11 @@ time_sleep_until — Make the script sleep until the specified time $timeA = time(); time_sleep_until($timeA-3); $timeB = time(); -echo ($timeB - $timeA) . " seconds."; +echo ($timeB - $timeA) . " seconds.\n"; ?> +===DONE=== --EXPECTF-- Warning: time_sleep_until(): Sleep until to time is less than current time in %s.php on line %d -0 seconds.
\ No newline at end of file +0 seconds. +===DONE===
\ No newline at end of file |
