Skip to content

Commit e188156

Browse files
committed
Add tests for #83 and #84
Signed-off-by: Michal Čihař <[email protected]>
1 parent c543b67 commit e188156

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Utils/FormatterTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ public function formatQueries()
126126
' <span class="sql-reserved">PRIMARY KEY</span>(<span class="sql-variable">`id`</span>)',
127127
array('type' => 'html'),
128128
),
129+
array(
130+
"select '<s>xss' from `<s>xss` , <s>nxss /*s<s>xss*/",
131+
'<span class="sql-reserved">SELECT</span><br/> <span class="sql-string">\'&lt;s&gt;xss\'</span><br/><span class="sql-reserved">FROM</span><br/> <span class="sql-variable">`&lt;s&gt;xss`</span>,<br/> &lt; s &gt; nxss <span class="sql-comment">/*s&lt;s&gt;xss*/</span>',
132+
array('type' => 'html'),
133+
),
134+
array(
135+
"select 'text\x1b[33mcolor-inj' from tbl",
136+
"\x1b[35mSELECT\n \x1b[91m'text\\x1B[33mcolor-inj'\n\x1b[35mFROM\n \x1b[39mtbl\x1b[0m",
137+
array('type' => 'cli'),
138+
),
129139
);
130140
}
131141
}

0 commit comments

Comments
 (0)