flush
[m6w6/ext-psi] / tests / time / asc_gmtime001.phpt
diff --git a/tests/time/asc_gmtime001.phpt b/tests/time/asc_gmtime001.phpt
new file mode 100644 (file)
index 0000000..3ae7850
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--
+asctime/gmtime
+--SKIPIF--
+<?php
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--ENV--
+TZ=UTC
+--INI--
+psi.directory = {PWD}/../../psi.d:{PWD}
+--FILE--
+===TEST===
+<?php
+var_dump(psi\asctime(NULL));
+var_dump(psi\asctime_r(NULL));
+var_dump(psi\asctime(psi\gmtime(1234567890)));
+var_dump(psi\asctime_r(psi\gmtime_r(1234567890)));
+?>
+===DONE===
+--EXPECT--
+===TEST===
+string(25) "Sun Jan  0 00:00:00 1900
+"
+string(25) "Sun Jan  0 00:00:00 1900
+"
+string(25) "Fri Feb 13 23:31:30 2009
+"
+string(25) "Fri Feb 13 23:31:30 2009
+"
+===DONE===