From d1d7890a879d7a5efa95450db26f92b988b216e6 Mon Sep 17 00:00:00 2001 From: "Edgar R. Sandi" Date: Wed, 16 Sep 2015 08:38:35 -0300 Subject: [PATCH] adding test scenario to improve coverage --- ext/date/tests/date_sun_info_003.phpt | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ext/date/tests/date_sun_info_003.phpt diff --git a/ext/date/tests/date_sun_info_003.phpt b/ext/date/tests/date_sun_info_003.phpt new file mode 100644 index 0000000000..3ff7a06df1 --- /dev/null +++ b/ext/date/tests/date_sun_info_003.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test basic date_sun_info() +--CREDITS-- +edgarsandi - +--FILE-- + $elem ) { + echo "$key: " . date("H:i:s", $elem) . "\n"; +} + +echo "\n"; + +$sun_info = date_sun_info(strtotime("2015-09-12 00:00:00 UTC"), 89.00, 1.00); +foreach ($sun_info as $key => $elem ) { + echo "$key: " . date("H:i:s", $elem) . "\n"; +} + +echo "Done\n"; +?> +--EXPECTF-- +sunrise: 21:00:00 +sunset: 21:00:00 +transit: 10:04:02 +civil_twilight_begin: 21:00:00 +civil_twilight_end: 21:00:00 +nautical_twilight_begin: 21:00:00 +nautical_twilight_end: 21:00:00 +astronomical_twilight_begin: 21:00:00 +astronomical_twilight_end: 21:00:00 + +sunrise: 21:00:01 +sunset: 21:00:01 +transit: 08:52:30 +civil_twilight_begin: 21:00:01 +civil_twilight_end: 21:00:01 +nautical_twilight_begin: 21:00:01 +nautical_twilight_end: 21:00:01 +astronomical_twilight_begin: 21:00:01 +astronomical_twilight_end: 21:00:01 +Done \ No newline at end of file -- 2.40.0