Skip to content

Commit

Permalink
Unit Test / ObjectTest fix - empty-string as prop-name seems to be su…
Browse files Browse the repository at this point in the history
…pported since php 7.4
  • Loading branch information
bkdotcom committed Sep 5, 2023
1 parent 78c97df commit 77ccc24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Debug/Type/ObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,18 +610,18 @@ public static function providerTestMethod()
'html' => '<li class="m_log"><div class="t_object" data-accessible="public"><span class="classname">stdClass</span>
<dl class="object-inner">
%A<dt class="properties">properties</dt>
' . (PHP_VERSION_ID >= 70100 ? '<dd class="property public"><span class="t_modifier_public">public</span> <span class="t_identifier t_string"></span> <span class="t_operator">=</span> <span class="t_string">empty</span></dd>' . "\n" : '')
' . (PHP_VERSION_ID >= 70400 ? '<dd class="property public"><span class="t_modifier_public">public</span> <span class="t_identifier t_string"></span> <span class="t_operator">=</span> <span class="t_string">empty</span></dd>' . "\n" : '')
. '<dd class="property public"><span class="t_modifier_public">public</span> <span class="t_identifier t_string"> </span> <span class="t_operator">=</span> <span class="t_string">space</span></dd>
<dd class="property public"><span class="t_modifier_public">public</span> <span class="no-quotes t_identifier t_string"><a class="unicode" href="https://unicode-table.com/en/200b" target="unicode-table" title="Zero Width Space: \xe2 \x80 \x8b">\u200b</a></span> <span class="t_operator">=</span> <span class="t_string">zwsp</span></dd>
<dd class="property public"><span class="t_modifier_public">public</span> <span class="no-quotes t_identifier t_string"><a class="unicode" href="https://unicode-table.com/en/feff" target="unicode-table" title="BOM / Zero Width No-Break Space: \xef \xbb \xbf">\ufeff</a></span> <span class="t_operator">=</span> <span class="t_string">bom</span></dd>
<dd class="property public"><span class="t_modifier_public">public</span> <span class="t_identifier t_string"><a class="unicode" href="https://unicode-table.com/en/feff" target="unicode-table" title="BOM / Zero Width No-Break Space: \xef \xbb \xbf">\ufeff</a>bom<span class="ws_r"></span><span class="ws_n"></span>
<span class="ws_t">%s</span><span class="binary"><span class="c1-control" title="BEL (bell): \x07">␇</span></span> <span class="binary"><span class="c1-control" title="US (unit seperator): \x1f">␟</span></span> <span class="binary"><span class="c1-control" title="DEL: \x7f">␡</span></span> <a class="unicode" href="https://unicode-table.com/en/00a0" target="unicode-table" title="NBSP: \xc2 \xa0">\u00a0</a>&lt;i&gt;(nbsp)&lt;/i&gt; <a class="unicode" href="https://unicode-table.com/en/2009" target="unicode-table" title="Thin Space: \xe2 \x80 \x89">\u2009</a>(thsp), &amp; <a class="unicode" href="https://unicode-table.com/en/200b" target="unicode-table" title="Zero Width Space: \xe2 \x80 \x8b">\u200b</a>(zwsp)</span> <span class="t_operator">=</span> <span class="t_string">ctrl chars and whatnot</span></dd>
%A</dl>
</div></li>',
'script' => 'console.log({"___class_name":"stdClass",' . (PHP_VERSION_ID >= 70100 ? '"(public) ":"empty",' : '') . '"(public) ":"space","(public) \\\u{200b}":"zwsp","(public) \\\u{feff}":"bom","(public) \\\u{feff}bom\r\n\t\\\x07 \\\x1f \\\x7f \\\u{00a0}<i>(nbsp)</i> \\\u{2009}(thsp), & \\\u{200b}(zwsp)":"ctrl chars and whatnot"});',
'script' => 'console.log({"___class_name":"stdClass",' . (PHP_VERSION_ID >= 70400 ? '"(public) ":"empty",' : '') . '"(public) ":"space","(public) \\\u{200b}":"zwsp","(public) \\\u{feff}":"bom","(public) \\\u{feff}bom\r\n\t\\\x07 \\\x1f \\\x7f \\\u{00a0}<i>(nbsp)</i> \\\u{2009}(thsp), & \\\u{200b}(zwsp)":"ctrl chars and whatnot"});',
'text' => 'stdClass
Properties:
' . (PHP_VERSION_ID >= 70100 ? '(public) "" = "empty"' . "\n" : '')
' . (PHP_VERSION_ID >= 70400 ? '(public) "" = "empty"' . "\n" : '')
. '(public) " " = "space"
(public) \u{200b} = "zwsp"
(public) \u{feff} = "bom"
Expand Down

0 comments on commit 77ccc24

Please sign in to comment.