Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdotcom committed Sep 11, 2024
1 parent fbe6108 commit 31e20f5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/Debug/Type/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static function providerTestMethod()
<li><span class="t_key"><span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span></span><span class="t_operator">=&gt;</span><span class="t_string">zwsp</span></li>
<li><span class="t_key"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span></span><span class="t_operator">=&gt;</span><span class="t_string">bom</span></li>
<li><span class="t_key"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span>bom<span class="ws_r"></span><span class="ws_n"></span>
<span class="ws_t">%s</span><span class="char-control" title="\x07: BEL (bell)">␇</span> <span class="char-control" title="\x1f: US (unit separator)">␟</span> <span class="char-control" title="\x7f: DEL">␡</span> <span class="char-control" title="\x00: NUL">␀</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)</span><span class="t_operator">=&gt;</span><span class="t_string">ctrl chars and whatnot</span></li>
<span class="ws_t">%s</span><span class="char-control" data-abbr="BEL" title="\x07: BEL (bell)">␇</span> <span class="char-control" data-abbr="US" title="\x1f: US (unit separator)">␟</span> <span class="char-control" data-abbr="DEL" title="\x7f: DEL">␡</span> <span class="char-control" data-abbr="NUL" title="\x00: NUL">␀</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)</span><span class="t_operator">=&gt;</span><span class="t_string">ctrl chars and whatnot</span></li>
<li><span class="t_key">not<span class="binary">\x80</span><span class="unicode" data-code-point="03C5" title="U-03C5: GREEK SMALL LETTER UPSILON">' . "\xCF\x85" . '</span>tf8</span><span class="t_operator">=&gt;</span><span class="t_string">not utf8</span></li>
<li><span class="t_key"> </span><span class="t_operator">=&gt;</span><span class="t_string">space</span></li>
<li><span class="t_key"></span><span class="t_operator">=&gt;</span><span class="t_string">empty</span></li>
Expand Down
2 changes: 1 addition & 1 deletion tests/Debug/Type/ObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ static function ($foo, $bar) {
<dd class="property public"><span class="t_modifier_public">public</span> <span class="no-quotes t_identifier t_string"><span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span></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"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span></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"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span>bom<span class="ws_r"></span><span class="ws_n"></span>
<span class="ws_t">%s</span><span class="char-control" title="\x07: BEL (bell)">␇</span> <span class="char-control" title="\x1f: US (unit separator)">␟</span> <span class="char-control" title="\x7f: DEL">␡</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)</span> <span class="t_operator">=</span> <span class="t_string">ctrl chars and whatnot</span></dd>
<span class="ws_t">%s</span><span class="char-control" data-abbr="BEL" title="\x07: BEL (bell)">␇</span> <span class="char-control" data-abbr="US" title="\x1f: US (unit separator)">␟</span> <span class="char-control" data-abbr="DEL" title="\x7f: DEL">␡</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(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 >= 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"});',
Expand Down
4 changes: 2 additions & 2 deletions tests/Debug/Type/StringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public static function providerTestMethod()
);
},
'firephp' => 'X-Wf-1-1-1-19: %d|[{"Type":"LOG"},"\\\\u{feff}Pesky <abbr title=\"Byte-Order-Mark\">BOM</abbr> and \\\x07 (a control char)."]|',
'html' => '<li class="m_log"><span class="no-quotes t_string"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span>Pesky <abbr title="Byte-Order-Mark">BOM</abbr> and <span class="char-control" title="\x07: BEL (bell)">␇</span> (a control char).</span></li>',
'html' => '<li class="m_log"><span class="no-quotes t_string"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span>Pesky <abbr title="Byte-Order-Mark">BOM</abbr> and <span class="char-control" data-abbr="BEL" title="\x07: BEL (bell)">␇</span> (a control char).</span></li>',
'script' => 'console.log("\\\u{feff}Pesky <abbr title=\"Byte-Order-Mark\">BOM</abbr> and \\\x07 (a control char).");',
'streamAnsi' => \str_replace('\e', "\e", '\e[34;48;5;14m\u{feff}\e[0mPesky <abbr title="Byte-Order-Mark">BOM</abbr> and \e[34;48;5;14m\x07\e[0m (a control char).'),
'text' => '\u{feff}Pesky <abbr title="Byte-Order-Mark">BOM</abbr> and \x07 (a control char).',
Expand Down Expand Up @@ -211,7 +211,7 @@ public static function providerTestMethod()
), $logEntry['args']);
},
'firephp' => 'X-Wf-1-1-1-5: 165|[{"Label":"\tcontrol chars: \\\x07 \\\x1f \\\x7f\r\n","Type":"LOG"},"\teasy-to-miss \\\u{0441}haracters such as \\\u{00a0}(nbsp), \\\u{2009}(thsp), &amp; \\\u{200b}(zwsp)"]|',
'html' => '<li class="m_log"><span class="no-quotes t_string">' . "\t" . 'control chars: <span class="char-control" title="\x07: BEL (bell)">␇</span> <span class="char-control" title="\x1f: US (unit separator)">␟</span> <span class="char-control" title="\x7f: DEL">␡</span>' . "\r\n"
'html' => '<li class="m_log"><span class="no-quotes t_string">' . "\t" . 'control chars: <span class="char-control" data-abbr="BEL" title="\x07: BEL (bell)">␇</span> <span class="char-control" data-abbr="US" title="\x1f: US (unit separator)">␟</span> <span class="char-control" data-abbr="DEL" title="\x7f: DEL">␡</span>' . "\r\n"
. '</span> = <span class="t_string"><span class="ws_t">' . "\t" . '</span>easy-to-miss <span class="unicode" data-code-point="0441" title="U-0441: CYRILLIC SMALL LETTER ES">' . "\xD1\x81" . '</span>haracters such as <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>(nbsp), <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp;amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)'
. '</span></li>',
'script' => 'console.log("\tcontrol chars: \\\x07 \\\x1f \\\x7f\r\n","\teasy-to-miss \\\u{0441}haracters such as \\\u{00a0}(nbsp), \\\u{2009}(thsp), &amp; \\\u{200b}(zwsp)");',
Expand Down
2 changes: 1 addition & 1 deletion tests/Debug/data/ConfusableIdentifiers_html.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<li><span class="t_key">string</span><span class="t_operator">=&gt;</span><span class="t_string">str<span class="unicode" data-code-point="0131" title="U-0131: LATIN SMALL LETTER DOTLESS I">ı</span>ngy<span class="ws_n"></span>
string</span></li>
<li><span class="t_key">ctrl chars and whatnot</span><span class="t_operator">=&gt;</span><span class="t_string"><span class="char-ws" data-code-point="FEFF" title="U-FEFF: BOM / Zero Width No-Break Space">\u{feff}</span>bom<span class="ws_r"></span><span class="ws_n"></span>
<span class="ws_t"> </span><span class="char-control" title="\x07: BEL (bell)">␇</span> <span class="char-control" title="\x1f: US (unit separator)">␟</span> <span class="char-control" title="\x7f: DEL">␡</span> <span class="char-control" title="\x00: NUL">␀</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)</span></li>
<span class="ws_t"> </span><span class="char-control" data-abbr="BEL" title="\x07: BEL (bell)">␇</span> <span class="char-control" data-abbr="US" title="\x1f: US (unit separator)">␟</span> <span class="char-control" data-abbr="DEL" title="\x7f: DEL">␡</span> <span class="char-control" data-abbr="NUL" title="\x00: NUL">␀</span> <span class="char-ws" data-code-point="00A0" title="U-00A0: NBSP">\u{00a0}</span>&lt;i&gt;(nbsp)&lt;/i&gt; <span class="char-ws" data-code-point="2009" title="U-2009: Thin Space">\u{2009}</span>(thsp), &amp; <span class="char-ws" data-code-point="200B" title="U-200B: Zero Width Space">\u{200b}</span>(zwsp)</span></li>
<li><span class="t_key">n<span class="unicode" data-code-point="03BF" title="U-03BF: GREEK SMALL LETTER OMICRON">ο</span>n<span class="binary">\x80</span>utf8</span><span class="t_operator">=&gt;</span><span class="t_string">test</span></li>
</ul><span class="t_punct">)</span></span></dd>
<dd class="property public"' . (PHP_VERSION_ID >= 80000 ? ' data-attributes="[{&quot;arguments&quot;:{&quot;f\u03c3o&quot;:&quot;ba\u0433&quot;},&quot;name&quot;:&quot;bdk\\\\Test\\\\Debug\\\\Fix\ud835\udc2dure\\\\Example\ud835\udf66ropAttribute&quot;}]" data-chars="[&quot;\u03c3&quot;,&quot;\u0433&quot;,&quot;\ud835\udc2d&quot;,&quot;\ud835\udf66&quot;]"' : '' ) . '><span class="t_modifier_public">public</span> <span class="t_type">string</span> <span class="no-quotes t_identifier t_string" title="[&lt;span class=&quot;unicode&quot; data-code-point=&quot;2CA2&quot; title=&quot;U-2CA2: COPTIC CAPITAL LETTER RO&quot;&gt;Ⲣ&lt;/span&gt;]roperty &lt;b&gt;desc&lt;/b&gt;"><span class="unicode" data-code-point="0581" title="U-0581: ARMENIAN SMALL LETTER CO">ց</span><span class="unicode" data-code-point="1D0F" title="U-1D0F: LATIN LETTER SMALL CAPITAL O">ᴏ</span><span class="unicode" data-code-point="0251" title="U-0251: LATIN SMALL LETTER ALPHA">ɑ</span>t</span> <span class="t_operator">=</span> <span class="t_string">moun<span class="unicode" data-code-point="1D42D" title="U-1D42D: MATHEMATICAL BOLD SMALL T">𝐭</span>ain</span></dd>
Expand Down

0 comments on commit 31e20f5

Please sign in to comment.