From c050045faaaf288b8f6c4a63c5e88ffeb58395c0 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sat, 13 Apr 2019 15:13:38 -0300 Subject: [PATCH] Add test for date timestamp - [date_timestamp_get] adding coverage for date_timestamp_get alias to DateTime::getTimestamp feature at PHPRio TestFest - [date_timestamp_get] adding coverage for date_timestamp_get basic feature at PHPRio TestFest - Combine tests into single file --- ext/date/tests/date_timestamp_get.phpt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ext/date/tests/date_timestamp_get.phpt diff --git a/ext/date/tests/date_timestamp_get.phpt b/ext/date/tests/date_timestamp_get.phpt new file mode 100644 index 0000000000..dc9f6ab541 --- /dev/null +++ b/ext/date/tests/date_timestamp_get.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test the basics to function date_timestamp_get(). +--CREDITS-- +Carlos Alexandre Pires de Carvalho Junior +Daiane Alves +Ednaldo Neimeg Marques +Henrique Ramos +Larissa Mourullo +Virgílio de Carvalho Pontes +Vitor Mattos +--FILE-- +getTimeStamp(); +$beginDtObj = date_create('1970-01-01T00:00:00UTC'); +$beginTimestamp = date_timestamp_get($beginDtObj); +var_dump($dateTimeTz === $beginTimestamp); +?> +--EXPECT-- +int(0) +bool(true) -- 2.49.0