Skip to content

Commit

Permalink
Merge pull request #82 from voku/analysis-nNP5Ew
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
voku committed Oct 3, 2021
2 parents dcd44ad + dc6b759 commit e9cd8e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/XssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,20 @@ public function testNoXss()
static::assertSame($html, $antiXssHtml->xss_clean($html));
}

public function testArray()
public function testArray()
{
$antiXss = new AntiXSS();
$test = ['key1'=>"<script>alert('hax');</script>"];
$antiXss->xss_clean($test);
static::assertSame(true, $antiXss->isXssFound());

$antiXss = new AntiXSS();
$test = ['key1'=>"<script>alert('hax');</script>", 'key2'=>"test"];
$test = ['key1'=>"<script>alert('hax');</script>", 'key2'=>'test'];
$antiXss->xss_clean($test);
static::assertSame(true, $antiXss->isXssFound());

$antiXss = new AntiXSS();
$test = ["key1"=>"test", 'key2'=>"<script>alert('hax');</script>"];
$test = ['key1'=>'test', 'key2'=>"<script>alert('hax');</script>"];
$antiXss->xss_clean($test);
static::assertSame(true, $antiXss->isXssFound());
}
Expand Down

0 comments on commit e9cd8e1

Please sign in to comment.