@@ -65,29 +65,13 @@ public function test_post_markdown()
6565 $ this ->sid
6666 ));
6767
68- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
69- {
70- $ expected = <<<EOT
68+ $ expected = <<<EOT
7169<p>Code:</p>
7270
7371<div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>echo 'message';</code></pre></div>
7472
7573<p>Inline <code>code</code></p>
7674EOT ;
77- }
78- else
79- {
80- $ expected = <<<EOT
81- <p>Code:</p>
82-
83- <div class="codebox">
84- <p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p>
85- <pre><code>echo 'message';</code></pre>
86- </div>
87-
88- <p>Inline <code>code</code></p>
89- EOT ;
90- }
9175
9276 $ result = $ crawler ->filter (sprintf (
9377 '#post_content%d .content ' ,
@@ -120,29 +104,13 @@ public function test_private_message()
120104 $ this ->sid
121105 ));
122106
123- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
124- {
125- $ expected = <<<EOT
107+ $ expected = <<<EOT
126108<p>Code:</p>
127109
128110<div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>echo 'message';</code></pre></div>
129111
130112<p>Inline <code>code</code></p>
131113EOT ;
132- }
133- else
134- {
135- $ expected = <<<EOT
136- <p>Code:</p>
137-
138- <div class="codebox">
139- <p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p>
140- <pre><code>echo 'message';</code></pre>
141- </div>
142-
143- <p>Inline <code>code</code></p>
144- EOT ;
145- }
146114
147115 $ result = $ crawler ->filter (sprintf (
148116 '#post-%d .content ' ,
@@ -172,28 +140,10 @@ public function test_simple_table()
172140 $ this ->sid
173141 ));
174142
175- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
176- {
177- $ expected = <<<EOT
143+ $ expected = <<<EOT
178144<table class="markdown"><thead><tr><th>Header 1</th><th>Header 2</th></tr></thead>
179145<tbody><tr><td>Cell 1</td><td>Cell 2</td></tr></tbody></table>
180146EOT ;
181- }
182- else
183- {
184- $ expected = <<<EOT
185- <table class="markdown">
186- <thead><tr>
187- <th>Header 1</th>
188- <th>Header 2</th>
189- </tr></thead>
190- <tbody><tr>
191- <td>Cell 1</td>
192- <td>Cell 2</td>
193- </tr></tbody>
194- </table>
195- EOT ;
196- }
197147
198148 $ result = $ crawler ->filter (sprintf (
199149 '#post_content%d .content ' ,
@@ -224,28 +174,10 @@ public function test_compact_table()
224174 $ this ->sid
225175 ));
226176
227- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
228- {
229- $ expected = <<<EOT
177+ $ expected = <<<EOT
230178<table class="markdown"><thead><tr><th>Header 1</th><th>Header 2</th></tr></thead>
231179<tbody><tr><td>Cell 1</td><td>Cell 2</td></tr></tbody></table>
232180EOT ;
233- }
234- else
235- {
236- $ expected = <<<EOT
237- <table class="markdown">
238- <thead><tr>
239- <th>Header 1</th>
240- <th>Header 2</th>
241- </tr></thead>
242- <tbody><tr>
243- <td>Cell 1</td>
244- <td>Cell 2</td>
245- </tr></tbody>
246- </table>
247- EOT ;
248- }
249181
250182 $ result = $ crawler ->filter (sprintf (
251183 '#post_content%d .content ' ,
@@ -276,30 +208,10 @@ public function test_table_text_aligntment()
276208 $ this ->sid
277209 ));
278210
279- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
280- {
281- $ expected = <<<EOT
211+ $ expected = <<<EOT
282212<table class="markdown"><thead><tr><th style="text-align:left">Left</th><th style="text-align:center">Center</th><th style="text-align:right">Right</th></tr></thead>
283213<tbody><tr><td style="text-align:left">x</td><td style="text-align:center">x</td><td style="text-align:right">x</td></tr></tbody></table>
284214EOT ;
285- }
286- else
287- {
288- $ expected = <<<EOT
289- <table class="markdown">
290- <thead><tr>
291- <th style="text-align:left">Left</th>
292- <th style="text-align:center">Center</th>
293- <th style="text-align:right">Right</th>
294- </tr></thead>
295- <tbody><tr>
296- <td style="text-align:left">x</td>
297- <td style="text-align:center">x</td>
298- <td style="text-align:right">x</td>
299- </tr></tbody>
300- </table>
301- EOT ;
302- }
303215
304216 $ result = $ crawler ->filter (sprintf (
305217 '#post_content%d .content ' ,
@@ -407,28 +319,11 @@ public function test_task_list()
407319 $ this ->assertSame (2 , $ list ->count ());
408320 $ this ->assertSame (3 , $ items ->count ());
409321
410- if (version_compare (PHP_VERSION , '7.3.0 ' , '>= ' ))
411- {
412- $ expected = <<<EOT
322+ $ expected = <<<EOT
413323<ul class="markdown"><li data-task-id="..." data-task-state="checked"><input data-task-id="..." type="checkbox" checked disabled> Task 1
414324 <ul class="markdown"><li data-task-id="..." data-task-state="checked"><input data-task-id="..." type="checkbox" checked disabled> Task 1.1</li></ul></li>
415325<li data-task-id="..." data-task-state="unchecked"><input data-task-id="..." type="checkbox" disabled> Task 2</li></ul>
416326EOT ;
417- }
418- else
419- {
420- $ expected = <<<EOT
421- <ul class="markdown">
422- <li data-task-id="..." data-task-state="checked">
423- <input data-task-id="..." type="checkbox" checked disabled> Task 1
424- <ul class="markdown"><li data-task-id="..." data-task-state="checked">
425- <input data-task-id="..." type="checkbox" checked disabled> Task 1.1</li></ul>
426- </li>
427- <li data-task-id="..." data-task-state="unchecked">
428- <input data-task-id="..." type="checkbox" disabled> Task 2</li>
429- </ul>
430- EOT ;
431- }
432327
433328 $ html = $ this ->task_id_placeholder ($ result ->html ());
434329 $ expected = $ this ->task_id_placeholder ($ expected );
0 commit comments