- New tests (testfest Quebec)

This commit is contained in:
Felipe Pena 2009-05-17 01:16:35 +00:00
parent 1bcc3aac33
commit 7c30401aec
6 changed files with 81 additions and 0 deletions

View 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)

View 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)

View 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)

View 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)

View 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)

View 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)