|
1 | 1 | --TEST--
|
2 | 2 | Test date_sunset() function : usage variation - Passing high positive and negative float values to time argument.
|
| 3 | +--SKIPIF-- |
| 4 | +<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?> |
3 | 5 | --FILE--
|
4 | 6 | <?php
|
5 | 7 | /* Prototype : mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
|
@@ -32,16 +34,28 @@ var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zen
|
32 | 34 |
|
33 | 35 | ?>
|
34 | 36 | ===DONE===
|
35 |
| ---EXPECTREGEX-- |
36 |
| -\*\*\* Testing date_sunset\(\) : usage variation \*\*\* |
37 |
| - |
38 |
| --- Testing date_sunset\(\) function by passing float 12.3456789000e10 value to time -- |
39 |
| -string\(5\) "(19:49|19:28)" |
40 |
| -float\((19.830[0-9]*|19.830[0-9]*|19.480[0-9]*)\) |
41 |
| -int\((-1097212211|123456853728)\) |
42 |
| - |
43 |
| --- Testing date_sunset\(\) function by passing float -12.3456789000e10 value to time -- |
44 |
| -string\(5\) "(19:03|18:12|18:48)" |
45 |
| -float\((19.056[0-9]*|18.213[0-9]*|18.808[0-9]*)\) |
46 |
| -int\((1097345002|-2147410031|-123456723090)\) |
| 37 | +--EXPECTF-- |
| 38 | +*** Testing date_sunset() : usage variation *** |
| 39 | + |
| 40 | +-- Testing date_sunset() function by passing float 12.3456789000e10 value to time -- |
| 41 | + |
| 42 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 43 | +bool(false) |
| 44 | + |
| 45 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 46 | +bool(false) |
| 47 | + |
| 48 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 49 | +bool(false) |
| 50 | + |
| 51 | +-- Testing date_sunset() function by passing float -12.3456789000e10 value to time -- |
| 52 | + |
| 53 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 54 | +bool(false) |
| 55 | + |
| 56 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 57 | +bool(false) |
| 58 | + |
| 59 | +Warning: date_sunset() expects parameter 1 to be long, double given in %s on line %d |
| 60 | +bool(false) |
47 | 61 | ===DONE===
|
0 commit comments