summaryrefslogtreecommitdiffstats
path: root/06897991d042115185fd98ff4e79569fbe51e0bf.patch
blob: ad74ac656a8f0107ac366f68947d7bc88908eba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 06897991d042115185fd98ff4e79569fbe51e0bf Mon Sep 17 00:00:00 2001
From: USAMI Kenta <tadsan@zonu.me>
Date: Thu, 11 Jul 2019 17:36:55 +0900
Subject: [PATCH] Add temporary tests to detect class errors

---
 tests/immutable_override_008.phpt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/immutable_override_008.phpt b/tests/immutable_override_008.phpt
index 8ecec38..7addcf3 100644
--- a/tests/immutable_override_008.phpt
+++ b/tests/immutable_override_008.phpt
@@ -35,6 +35,11 @@ var_dump($dt0->format("Y-m-d H:i:s.uP"));
 foreach ($tests_args as $args) {
     timecop_freeze($dt0);
     $dt1 = call_user_func_array(array("DateTimeImmutable","createFromFormat"), $args);
+    if (!$dt1 instanceof DateTimeImmutable) {
+        // TODO: output an appropriate message
+        echo get_class($dt1), "\n";
+    }
+
     var_dump($dt1->format("Y-m-d H:i:s.uP"));
     while (true) {
         /* test for equality between timecop_date_create_from_format() and date_create_from_format() */