| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | function testXss() |
||
| 46 | { |
||
| 47 | |||
| 48 | $cerberus = new CerberusService(); |
||
| 49 | $cerberus->setOptions($this->getOptions()); |
||
| 50 | |||
| 51 | $data = 'http://localhost/text.php/"><script>alert(“Gehackt!”);</script></form><form action="/...'; |
||
| 52 | $detection = $cerberus |
||
| 53 | ->pushHandler(new XssHandler($data)); |
||
| 54 | |||
| 55 | $this->assertEquals(10, $detection->getScore()); |
||
| 56 | $this->assertEquals('{"Xss":10}', $detection->getResult()); |
||
| 57 | } |
||
| 58 | |||
| 60 |