Annotation of embedaddon/php/ext/date/tests/date_sunset_variation9.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test date_sunset() function : usage variation - Passing high positive and negative float values to time argument.
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])
        !             6:  * Description: Returns time of sunset for a given day and location 
        !             7:  * Source code: ext/date/php_date.c
        !             8:  * Alias to functions: 
        !             9:  */
        !            10: 
        !            11: echo "*** Testing date_sunset() : usage variation ***\n";
        !            12: 
        !            13: // GMT is zero for the timezone
        !            14: date_default_timezone_set("Asia/Calcutta");
        !            15: //Initialise the variables
        !            16: $latitude = 38.4;
        !            17: $longitude = -9;
        !            18: $zenith = 90;
        !            19: $gmt_offset = 1;
        !            20: 
        !            21: echo "\n-- Testing date_sunset() function by passing float 12.3456789000e10 value to time --\n";
        !            22: $time = 12.3456789000e10;
        !            23: var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
        !            24: var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
        !            25: var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
        !            26: 
        !            27: echo "\n-- Testing date_sunset() function by passing float -12.3456789000e10 value to time --\n";
        !            28: $time = -12.3456789000e10;
        !            29: var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $longitude, $zenith, $gmt_offset) );
        !            30: var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, $zenith, $gmt_offset) );
        !            31: var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $longitude, $zenith, $gmt_offset) );
        !            32: 
        !            33: ?>
        !            34: ===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)\)
        !            47: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>