1
1
<?php
2
- // phpcs:disable WordPress.PHP.StrictInArray.MissingTrueStrict
3
2
4
3
/**
5
4
* Class ActionScheduler_wpCommentLogger_Test
@@ -71,6 +70,8 @@ public function test_storage_comments() {
71
70
$ logger = ActionScheduler::logger ();
72
71
$ logs = $ logger ->get_logs ( $ action_id );
73
72
$ expected = new ActionScheduler_LogEntry ( $ action_id , 'action created ' );
73
+
74
+ // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
74
75
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ expected ), $ this ->log_entry_to_array ( $ logs ) ) );
75
76
}
76
77
@@ -102,8 +103,11 @@ public function test_execution_comments() {
102
103
$ runner ->run ( 'Unit Tests ' );
103
104
104
105
$ logs = $ logger ->get_logs ( $ action_id );
106
+
107
+ // phpcs:disable WordPress.PHP.StrictInArray.MissingTrueStrict
105
108
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ started ), $ this ->log_entry_to_array ( $ logs ) ) );
106
109
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ finished ), $ this ->log_entry_to_array ( $ logs ) ) );
110
+ // phpcs:enable
107
111
}
108
112
109
113
public function test_failed_execution_comments () {
@@ -120,9 +124,12 @@ public function test_failed_execution_comments() {
120
124
$ runner ->run ( 'Unit Tests ' );
121
125
122
126
$ logs = $ logger ->get_logs ( $ action_id );
127
+
128
+ // phpcs:disable WordPress.PHP.StrictInArray.MissingTrueStrict
123
129
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ started ), $ this ->log_entry_to_array ( $ logs ) ) );
124
130
$ this ->assertFalse ( in_array ( $ this ->log_entry_to_array ( $ finished ), $ this ->log_entry_to_array ( $ logs ) ) );
125
131
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ failed ), $ this ->log_entry_to_array ( $ logs ) ) );
132
+ // phpcs:enable
126
133
}
127
134
128
135
public function test_failed_schedule_next_instance_comments () {
@@ -137,6 +144,8 @@ public function test_failed_schedule_next_instance_comments() {
137
144
}
138
145
139
146
$ logs = $ logger ->get_logs ( $ action_id );
147
+
148
+ // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
140
149
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ log_entry ), $ this ->log_entry_to_array ( $ logs ) ) );
141
150
}
142
151
@@ -170,6 +179,8 @@ public function test_canceled_action_comments() {
170
179
$ logger = ActionScheduler::logger ();
171
180
$ logs = $ logger ->get_logs ( $ action_id );
172
181
$ expected = new ActionScheduler_LogEntry ( $ action_id , 'action canceled ' );
182
+
183
+ // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
173
184
$ this ->assertTrue ( in_array ( $ this ->log_entry_to_array ( $ expected ), $ this ->log_entry_to_array ( $ logs ) ) );
174
185
}
175
186
0 commit comments