tony2001                Fri Dec 22 13:07:53 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/date/tests     010.phpt 011.phpt 012.phpt 013.phpt 
                                014.phpt date_parse_001.phpt 
                                date_sun_info_001.phpt 
  Log:
  more tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/010.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/010.phpt
+++ php-src/ext/date/tests/010.phpt
--TEST--
timezone_abbreviations_list() tests
--INI--
date.timezone=UTC
--FILE--
<?php
  $timezone_abbreviations = timezone_abbreviations_list();
  var_dump($timezone_abbreviations["est"]);
  echo "Done\n";
?>
--EXPECTF--
array(70) {
  [0]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(16) "America/New_York"
  }
  [1]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Antigua"
  }
  [2]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(16) "America/Atikokan"
  }
  [3]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(21) "America/Cambridge_Bay"
  }
  [4]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "America/Cancun"
  }
  [5]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "America/Cayman"
  }
  [6]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Chicago"
  }
  [7]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(21) "America/Coral_Harbour"
  }
  [8]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Detroit"
  }
  [9]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(18) "America/Fort_Wayne"
  }
  [10]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(18) "America/Grand_Turk"
  }
  [11]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(28) "America/Indiana/Indianapolis"
  }
  [12]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(20) "America/Indiana/Knox"
  }
  [13]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(23) "America/Indiana/Marengo"
  }
  [14]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(26) "America/Indiana/Petersburg"
  }
  [15]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(21) "America/Indiana/Vevay"
  }
  [16]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(25) "America/Indiana/Vincennes"
  }
  [17]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(20) "America/Indianapolis"
  }
  [18]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Iqaluit"
  }
  [19]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Jamaica"
  }
  [20]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(27) "America/Kentucky/Louisville"
  }
  [21]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(27) "America/Kentucky/Monticello"
  }
  [22]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Knox_IN"
  }
  [23]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(18) "America/Louisville"
  }
  [24]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Managua"
  }
  [25]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(17) "America/Menominee"
  }
  [26]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "America/Merida"
  }
  [27]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(16) "America/Montreal"
  }
  [28]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "America/Nassau"
  }
  [29]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Nipigon"
  }
  [30]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "America/Panama"
  }
  [31]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(19) "America/Pangnirtung"
  }
  [32]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(22) "America/Port-au-Prince"
  }
  [33]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(20) "America/Rankin_Inlet"
  }
  [34]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(21) "America/Santo_Domingo"
  }
  [35]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(19) "America/Thunder_Bay"
  }
  [36]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "America/Toronto"
  }
  [37]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(14) "Canada/Eastern"
  }
  [38]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(3) "EST"
  }
  [39]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(7) "EST5EDT"
  }
  [40]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(7) "Jamaica"
  }
  [41]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(10) "US/Central"
  }
  [42]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(15) "US/East-Indiana"
  }
  [43]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(10) "US/Eastern"
  }
  [44]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(17) "US/Indiana-Starke"
  }
  [45]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(-18000)
    ["timezone_id"]=>
    string(11) "US/Michigan"
  }
  [46]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(13) "Australia/ACT"
  }
  [47]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(18) "Australia/Brisbane"
  }
  [48]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(18) "Australia/Canberra"
  }
  [49]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(16) "Australia/Currie"
  }
  [50]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(16) "Australia/Hobart"
  }
  [51]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(18) "Australia/Lindeman"
  }
  [52]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(19) "Australia/Melbourne"
  }
  [53]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(13) "Australia/NSW"
  }
  [54]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(20) "Australia/Queensland"
  }
  [55]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(16) "Australia/Sydney"
  }
  [56]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(18) "Australia/Tasmania"
  }
  [57]=>
  array(3) {
    ["dst"]=>
    bool(false)
    ["offset"]=>
    int(36000)
    ["timezone_id"]=>
    string(18) "Australia/Victoria"
  }
  [58]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(19) "Australia/Melbourne"
  }
  [59]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(13) "Australia/ACT"
  }
  [60]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(18) "Australia/Brisbane"
  }
  [61]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(18) "Australia/Canberra"
  }
  [62]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(16) "Australia/Currie"
  }
  [63]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(16) "Australia/Hobart"
  }
  [64]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(18) "Australia/Lindeman"
  }
  [65]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(13) "Australia/NSW"
  }
  [66]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(20) "Australia/Queensland"
  }
  [67]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(16) "Australia/Sydney"
  }
  [68]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(18) "Australia/Tasmania"
  }
  [69]=>
  array(3) {
    ["dst"]=>
    bool(true)
    ["offset"]=>
    int(39600)
    ["timezone_id"]=>
    string(18) "Australia/Victoria"
  }
}
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/011.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/011.phpt
+++ php-src/ext/date/tests/011.phpt
--TEST--
timezone_name_from_abbr() tests
--INI--
date.timezone=UTC
--FILE--
<?php

var_dump(timezone_name_from_abbr());
var_dump(timezone_name_from_abbr("CET"));
var_dump(timezone_name_from_abbr("AEST"));
var_dump(timezone_name_from_abbr("", 3600));
var_dump(timezone_name_from_abbr("", 3600, 0));

echo "Done\n";
?>
--EXPECTF--
Warning: timezone_name_from_abbr() expects at least 1 parameter, 0 given in %s 
on line 3
bool(false)
string(13) "Europe/Berlin"
bool(false)
bool(false)
string(12) "Europe/Paris"
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/012.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/012.phpt
+++ php-src/ext/date/tests/012.phpt
--TEST--
date_isodate_set() tests
--INI--
date.timezone=UTC
--FILE--
<?php

$dto = date_create("2006-12-12");
var_dump(date_isodate_set($dto, 2006, 2, 15));
var_dump($dto->format("Y/m/d H:i:s"));
var_dump(date_isodate_set($dto, 2006));
var_dump($dto->format("Y/m/d H:i:s"));
var_dump(date_isodate_set($dto, 2006, 5));
var_dump($dto->format("Y/m/d H:i:s"));
var_dump(date_isodate_set($dto, 2006, 100, 15));
var_dump($dto->format("Y/m/d H:i:s"));
var_dump(date_isodate_set($dto, 2006, 100, 15, 10));
var_dump($dto->format("Y/m/d H:i:s"));

echo "Done\n";
?>
--EXPECTF--
NULL
string(19) "2006/01/23 00:00:00"

Warning: date_isodate_set() expects at least 3 parameters, 2 given in %s on 
line %d
bool(false)
string(19) "2006/01/23 00:00:00"
NULL
string(19) "2006/01/30 00:00:00"
NULL
string(19) "2007/12/10 00:00:00"

Warning: date_isodate_set() expects at most 4 parameters, 5 given in %s on line 
%d
bool(false)
string(19) "2007/12/10 00:00:00"
Done
--UEXPECTF--
NULL
unicode(19) "2006/01/23 00:00:00"

Warning: date_isodate_set() expects at least 3 parameters, 2 given in %s on 
line %d
bool(false)
unicode(19) "2006/01/23 00:00:00"
NULL
unicode(19) "2006/01/30 00:00:00"
NULL
unicode(19) "2007/12/10 00:00:00"

Warning: date_isodate_set() expects at most 4 parameters, 5 given in %s on line 
%d
bool(false)
unicode(19) "2007/12/10 00:00:00"
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/013.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/013.phpt
+++ php-src/ext/date/tests/013.phpt
--TEST--
date_date_set() tests
--INI--
date.timezone=UTC
--FILE--
<?php

$dto = date_create("2006-12-12");
var_dump($dto);
var_dump($dto->format("Y.m.d H:i:s"));
var_dump(date_date_set());
var_dump($dto->format("Y.m.d H:i:s"));
var_dump(date_date_set($dto, 2006, 5));
var_dump($dto->format("Y.m.d H:i:s"));
var_dump(date_date_set($dto, 2006, 2, 15));
var_dump($dto->format("Y.m.d H:i:s"));
var_dump(date_date_set($dto, 2006, 24, 60));
var_dump($dto->format("Y.m.d H:i:s"));

echo "Done\n";
?>
--EXPECTF--
object(DateTime)#%d (0) {
}
string(19) "2006.12.12 00:00:00"

Warning: date_date_set() expects exactly 4 parameters, 0 given in %s on line %d
bool(false)
string(19) "2006.12.12 00:00:00"

Warning: date_date_set() expects exactly 4 parameters, 3 given in %s on line %d
bool(false)
string(19) "2006.12.12 00:00:00"
NULL
string(19) "2006.02.15 00:00:00"
NULL
string(19) "2008.01.29 00:00:00"
Done
--UEXPECTF--
object(DateTime)#%d (0) {
}
unicode(19) "2006.12.12 00:00:00"

Warning: date_date_set() expects exactly 4 parameters, 0 given in %s on line %d
bool(false)
unicode(19) "2006.12.12 00:00:00"

Warning: date_date_set() expects exactly 4 parameters, 3 given in %s on line %d
bool(false)
unicode(19) "2006.12.12 00:00:00"
NULL
unicode(19) "2006.02.15 00:00:00"
NULL
unicode(19) "2008.01.29 00:00:00"
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/014.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/014.phpt
+++ php-src/ext/date/tests/014.phpt
--TEST--
timezone_offset_get() tests
--INI--
date.timezone=UTC
--FILE--
<?php

$dto = date_create("2006-12-12");
var_dump($dto);

$dtz = date_timezone_get($dto);
var_dump($dtz);

var_dump(timezone_offset_get());
var_dump(timezone_offset_get($dtz, $dto));
var_dump(timezone_offset_get($dto, $dtz));

echo "Done\n";

?>
--EXPECTF-- 
object(DateTime)#%d (0) {
}
object(DateTimeZone)#%d (0) {
}

Warning: timezone_offset_get() expects exactly 2 parameters, 0 given in %s on 
line %d
bool(false)
int(0)

Warning: timezone_offset_get() expects parameter 1 to be DateTimeZone, object 
given in %s on line %d
bool(false)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_parse_001.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_parse_001.phpt
+++ php-src/ext/date/tests/date_parse_001.phpt
--TEST--
Test basic date_parse()
--INI--
date.timezone=UTC
--FILE--
<?php
    var_dump(date_parse("2006-12-12 10:00:00.5"));
        var_dump(date_parse("2006-12-12"));
    var_dump(date_parse("2006-12--12"));
    var_dump(date_parse("2006-02-30"));
    var_dump(date_parse("2006-03-04"));
    var_dump(date_parse("2006-03"));
    var_dump(date_parse("03-03"));
    var_dump(date_parse("0-0"));
    var_dump(date_parse(""));
    var_dump(date_parse(array()));
    echo "Done\n";
?>
--EXPECTF--     
array(12) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(12)
  ["day"]=>
  int(12)
  ["hour"]=>
  int(10)
  ["minute"]=>
  int(0)
  ["second"]=>
  int(0)
  ["fraction"]=>
  float(0.5)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
array(12) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(12)
  ["day"]=>
  int(12)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
array(15) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(12)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
    [7]=>
    string(20) "Unexpected character"
  }
  ["is_localtime"]=>
  bool(true)
  ["zone_type"]=>
  int(1)
  ["zone"]=>
  int(720)
  ["is_dst"]=>
  bool(false)
}
array(12) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(2)
  ["day"]=>
  int(30)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
array(12) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(3)
  ["day"]=>
  int(4)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
array(12) {
  ["year"]=>
  int(2006)
  ["month"]=>
  int(3)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(0)
  ["errors"]=>
  array(0) {
  }
  ["is_localtime"]=>
  bool(false)
}
array(15) {
  ["year"]=>
  bool(false)
  ["month"]=>
  bool(false)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(2)
  ["errors"]=>
  array(2) {
    [0]=>
    string(20) "Unexpected character"
    [1]=>
    string(20) "Unexpected character"
  }
  ["is_localtime"]=>
  bool(true)
  ["zone_type"]=>
  int(1)
  ["zone"]=>
  int(180)
  ["is_dst"]=>
  bool(false)
}
array(15) {
  ["year"]=>
  bool(false)
  ["month"]=>
  bool(false)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
    [0]=>
    string(20) "Unexpected character"
  }
  ["is_localtime"]=>
  bool(true)
  ["zone_type"]=>
  int(1)
  ["zone"]=>
  int(0)
  ["is_dst"]=>
  bool(false)
}
array(12) {
  ["year"]=>
  bool(false)
  ["month"]=>
  bool(false)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
    [0]=>
    string(12) "Empty string"
  }
  ["is_localtime"]=>
  bool(false)
}

Warning: date_parse() expects parameter 1 to be string, array given in %s on 
line %d
bool(false)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sun_info_001.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sun_info_001.phpt
+++ php-src/ext/date/tests/date_sun_info_001.phpt
--TEST--
Test basic date_sun_info()
--INI--
date.timezone=UTC
--FILE--
<?php
$sun_info = date_sun_info(strtotime("2006-12-12"), 31.7667, 35.2333);
var_dump($sun_info);
echo "Done\n";
?>
--EXPECTF--     
array(9) {
  ["sunrise"]=>
  int(1165899133)
  ["sunset"]=>
  int(1165934481)
  ["transit"]=>
  int(1165916807)
  ["civil_twilight_begin"]=>
  int(1165897449)
  ["civil_twilight_end"]=>
  int(1165936165)
  ["nautical_twilight_begin"]=>
  int(1165895547)
  ["nautical_twilight_end"]=>
  int(1165938067)
  ["astronomical_twilight_begin"]=>
  int(1165893693)
  ["astronomical_twilight_end"]=>
  int(1165939921)
}
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to