mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
- New tests (testfest Quebec)
This commit is contained in:
parent
1bcc3aac33
commit
7c30401aec
14
ext/date/tests/date_add_basic2.phpt
Normal file
14
ext/date/tests/date_add_basic2.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
date_add() return false with wrong params
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
display_errors=false
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(date_add()); // invalid parameters
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
14
ext/date/tests/date_create_from_format_basic.phpt
Normal file
14
ext/date/tests/date_create_from_format_basic.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
date_create_from_format() return false with wrong params
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
display_errors=false
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(date_create_from_format()); // invalid parameters
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
13
ext/date/tests/date_create_from_format_basic2.phpt
Normal file
13
ext/date/tests/date_create_from_format_basic2.phpt
Normal file
@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
date_create_from_format() return false
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(date_create_from_format('Y-m-d', '2009---01')); // invalid date
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
13
ext/date/tests/date_get_last_errors_basic.phpt
Normal file
13
ext/date/tests/date_get_last_errors_basic.phpt
Normal file
@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
date_get_last_errors() return false
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(date_get_last_errors()); // no date was parsed, so no errors
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
14
ext/date/tests/date_parse_from_format_basic.phpt
Normal file
14
ext/date/tests/date_parse_from_format_basic.phpt
Normal file
@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
date_parse_from_format() return false with wrong params
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
display_errors=false
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(date_parse_from_format()); // invalid parameters
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
13
ext/date/tests/strtotime_basic2.phpt
Normal file
13
ext/date/tests/strtotime_basic2.phpt
Normal file
@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
strtotime() with return false
|
||||
--CREDITS--
|
||||
"Anna Filina" <afilina@phpquebec.org>
|
||||
#PHPTestFest2009 2009-05-02
|
||||
--INI--
|
||||
date.timezone=UTC
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(strtotime('mayy 2 2009')); // misspelled month name
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
Loading…
Reference in New Issue
Block a user