Browse Source

Fix time_sleep_until() tests; not supported on Windows on 5.2

PHP-5.2.1RC1
andy wharmby 17 years ago
parent
commit
b5145cb74d
  1. 6
      ext/standard/tests/misc/time_sleep_until_basic.phpt
  2. 6
      ext/standard/tests/misc/time_sleep_until_error1.phpt
  3. 6
      ext/standard/tests/misc/time_sleep_until_error3.phpt
  4. 13
      tests/func/time_sleep_until_basic.phpt
  5. 12
      tests/func/time_sleep_until_error2.phpt

6
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===

6
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===

6
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===

13
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.
3 seconds.
===DONE===

12
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.
0 seconds.
===DONE===
Loading…
Cancel
Save