File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tests/codeigniter/helpers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,11 @@ public function test_censored_words()
101101
102102 public function test_highlight_code ()
103103 {
104- $ expect = "<code><span style= \"color: #000000 \"> \n<span style= \"color: #0000BB \"><?php var_dump</span><span style= \"color: #007700 \">(</span><span style= \"color: #0000BB \"> \$this</span><span style= \"color: #007700 \">); </span><span style= \"color: #0000BB \">?> </span> \n</span> \n</code> " ;
104+ if (PHP_VERSION_ID >= 80300 ) {
105+ $ expect = "<pre><code style= \"color: #000000 \"><span style= \"color: #0000BB \"><?php var_dump</span><span style= \"color: #007700 \">(</span><span style= \"color: #0000BB \"> \$this</span><span style= \"color: #007700 \">); </span><span style= \"color: #0000BB \">?> ?></span></code></pre> " ;
106+ } else {
107+ $ expect = "<code><span style= \"color: #000000 \"> \n<span style= \"color: #0000BB \"><?php var_dump</span><span style= \"color: #007700 \">(</span><span style= \"color: #0000BB \"> \$this</span><span style= \"color: #007700 \">); </span><span style= \"color: #0000BB \">?> </span> \n</span> \n</code> " ;
108+ }
105109
106110 $ this ->assertEquals ($ expect , highlight_code ('<?php var_dump($this); ?> ' ));
107111 }
You can’t perform that action at this time.
0 commit comments