summaryrefslogtreecommitdiff
path: root/ext/date/tests/date_offset_get_variation1.phpt
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2013-03-31 10:37:16 +0100
committerDerick Rethans <github@derickrethans.nl>2013-03-31 10:37:16 +0100
commit68a7fec7af2c8976820ae06063a112db6da82605 (patch)
treec6317dbb711fe6f7ab36b62172a84b74c7bd06d6 /ext/date/tests/date_offset_get_variation1.phpt
parent0e25e00ecf74bcc1a9e14eac25bd7d7cc4857c24 (diff)
downloadphp-git-68a7fec7af2c8976820ae06063a112db6da82605.tar.gz
Make DateTime and DateTimeImmutable siblings.
They both implement the DateTimeInterface interface, which specifies the non-modifying methods of DateTime/DateTimeImmutable.
Diffstat (limited to 'ext/date/tests/date_offset_get_variation1.phpt')
-rw-r--r--ext/date/tests/date_offset_get_variation1.phpt60
1 files changed, 30 insertions, 30 deletions
diff --git a/ext/date/tests/date_offset_get_variation1.phpt b/ext/date/tests/date_offset_get_variation1.phpt
index 9df6e2d16b..4b67b90646 100644
--- a/ext/date/tests/date_offset_get_variation1.phpt
+++ b/ext/date/tests/date_offset_get_variation1.phpt
@@ -2,10 +2,10 @@
Test date_offset_get() function : usage variation - Passing unexpected values to first argument $object.
--FILE--
<?php
-/* Prototype : int date_offset_get ( DateTime $object )
+/* Prototype : int date_offset_get ( DateTimeInterface $object )
* Description: Returns the daylight saving time offset
* Source code: ext/date/php_date.c
- * Alias to functions: DateTime::getOffset
+ * Alias to functions: DateTimeInterface::getOffset
*/
echo "*** Testing date_offset_get() : usage variation - unexpected values to first argument \$object***\n";
@@ -110,141 +110,141 @@ fclose( $file_handle );
-- int 0 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, integer given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, integer given in %s on line %d
bool(false)
-- int 1 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, integer given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, integer given in %s on line %d
bool(false)
-- int 12345 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, integer given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, integer given in %s on line %d
bool(false)
-- int -12345 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, integer given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, integer given in %s on line %d
bool(false)
-- float 10.5 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, double given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, double given in %s on line %d
bool(false)
-- float -10.5 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, double given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, double given in %s on line %d
bool(false)
-- float .5 --
-Warning: date_offset_get() expects parameter 1 to be DateTime, double given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, double given in %s on line %d
bool(false)
-- empty array --
-Warning: date_offset_get() expects parameter 1 to be DateTime, array given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
bool(false)
-- int indexed array --
-Warning: date_offset_get() expects parameter 1 to be DateTime, array given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
bool(false)
-- associative array --
-Warning: date_offset_get() expects parameter 1 to be DateTime, array given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
bool(false)
-- nested arrays --
-Warning: date_offset_get() expects parameter 1 to be DateTime, array given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, array given in %s on line %d
bool(false)
-- uppercase NULL --
-Warning: date_offset_get() expects parameter 1 to be DateTime, null given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
bool(false)
-- lowercase null --
-Warning: date_offset_get() expects parameter 1 to be DateTime, null given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
bool(false)
-- lowercase true --
-Warning: date_offset_get() expects parameter 1 to be DateTime, boolean given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, boolean given in %s on line %d
bool(false)
-- lowercase false --
-Warning: date_offset_get() expects parameter 1 to be DateTime, boolean given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, boolean given in %s on line %d
bool(false)
-- uppercase TRUE --
-Warning: date_offset_get() expects parameter 1 to be DateTime, boolean given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, boolean given in %s on line %d
bool(false)
-- uppercase FALSE --
-Warning: date_offset_get() expects parameter 1 to be DateTime, boolean given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, boolean given in %s on line %d
bool(false)
-- empty string DQ --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- empty string SQ --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- string DQ --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- string SQ --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- mixed case string --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- heredoc --
-Warning: date_offset_get() expects parameter 1 to be DateTime, string given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, string given in %s on line %d
bool(false)
-- instance of classWithToString --
-Warning: date_offset_get() expects parameter 1 to be DateTime, object given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
bool(false)
-- instance of classWithoutToString --
-Warning: date_offset_get() expects parameter 1 to be DateTime, object given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, object given in %s on line %d
bool(false)
-- undefined var --
-Warning: date_offset_get() expects parameter 1 to be DateTime, null given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
bool(false)
-- unset var --
-Warning: date_offset_get() expects parameter 1 to be DateTime, null given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, null given in %s on line %d
bool(false)
-- resource --
-Warning: date_offset_get() expects parameter 1 to be DateTime, resource given in %s on line %d
+Warning: date_offset_get() expects parameter 1 to be DateTimeInterface, resource given in %s on line %d
bool(false)
===DONE===