Browse Source

fix tests

PHAR_1_2
Antony Dovgal 19 years ago
parent
commit
edb8190a95
  1. 758
      ext/date/tests/010.phpt
  2. 285
      ext/date/tests/date_parse_001.phpt
  3. 22
      ext/date/tests/date_sun_info_001.phpt

758
ext/date/tests/010.phpt
File diff suppressed because it is too large
View File

285
ext/date/tests/date_parse_001.phpt

@ -301,3 +301,288 @@ array(12) {
Warning: date_parse() expects parameter 1 to be string, array given in %s on line %d
bool(false)
Done
--UEXPECTF--
array(12) {
[u"year"]=>
int(2006)
[u"month"]=>
int(12)
[u"day"]=>
int(12)
[u"hour"]=>
int(10)
[u"minute"]=>
int(0)
[u"second"]=>
int(0)
[u"fraction"]=>
float(0.5)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(0)
[u"errors"]=>
array(0) {
}
[u"is_localtime"]=>
bool(false)
}
array(12) {
[u"year"]=>
int(2006)
[u"month"]=>
int(12)
[u"day"]=>
int(12)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(0)
[u"errors"]=>
array(0) {
}
[u"is_localtime"]=>
bool(false)
}
array(15) {
[u"year"]=>
int(2006)
[u"month"]=>
int(12)
[u"day"]=>
bool(false)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(1)
[u"errors"]=>
array(1) {
[7]=>
string(20) "Unexpected character"
}
[u"is_localtime"]=>
bool(true)
[u"zone_type"]=>
int(1)
[u"zone"]=>
int(720)
[u"is_dst"]=>
bool(false)
}
array(12) {
[u"year"]=>
int(2006)
[u"month"]=>
int(2)
[u"day"]=>
int(30)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(0)
[u"errors"]=>
array(0) {
}
[u"is_localtime"]=>
bool(false)
}
array(12) {
[u"year"]=>
int(2006)
[u"month"]=>
int(3)
[u"day"]=>
int(4)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(0)
[u"errors"]=>
array(0) {
}
[u"is_localtime"]=>
bool(false)
}
array(12) {
[u"year"]=>
int(2006)
[u"month"]=>
int(3)
[u"day"]=>
bool(false)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(0)
[u"errors"]=>
array(0) {
}
[u"is_localtime"]=>
bool(false)
}
array(15) {
[u"year"]=>
bool(false)
[u"month"]=>
bool(false)
[u"day"]=>
bool(false)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(2)
[u"errors"]=>
array(2) {
[0]=>
string(20) "Unexpected character"
[1]=>
string(20) "Unexpected character"
}
[u"is_localtime"]=>
bool(true)
[u"zone_type"]=>
int(1)
[u"zone"]=>
int(180)
[u"is_dst"]=>
bool(false)
}
array(15) {
[u"year"]=>
bool(false)
[u"month"]=>
bool(false)
[u"day"]=>
bool(false)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(1)
[u"errors"]=>
array(1) {
[0]=>
string(20) "Unexpected character"
}
[u"is_localtime"]=>
bool(true)
[u"zone_type"]=>
int(1)
[u"zone"]=>
int(0)
[u"is_dst"]=>
bool(false)
}
array(12) {
[u"year"]=>
bool(false)
[u"month"]=>
bool(false)
[u"day"]=>
bool(false)
[u"hour"]=>
bool(false)
[u"minute"]=>
bool(false)
[u"second"]=>
bool(false)
[u"fraction"]=>
bool(false)
[u"warning_count"]=>
int(0)
[u"warnings"]=>
array(0) {
}
[u"error_count"]=>
int(1)
[u"errors"]=>
array(1) {
[0]=>
string(12) "Empty string"
}
[u"is_localtime"]=>
bool(false)
}
Warning: date_parse() expects parameter 1 to be binary string, array given in %s on line %d
bool(false)
Done

22
ext/date/tests/date_sun_info_001.phpt

@ -30,3 +30,25 @@ array(9) {
int(1165939380)
}
Done
--UEXPECTF--
array(9) {
[u"sunrise"]=>
int(1165897782)
[u"sunset"]=>
int(1165934168)
[u"transit"]=>
int(1165915975)
[u"civil_twilight_begin"]=>
int(1165896176)
[u"civil_twilight_end"]=>
int(1165935773)
[u"nautical_twilight_begin"]=>
int(1165894353)
[u"nautical_twilight_end"]=>
int(1165937597)
[u"astronomical_twilight_begin"]=>
int(1165892570)
[u"astronomical_twilight_end"]=>
int(1165939380)
}
Done
Loading…
Cancel
Save