Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
XssOutputValidatorTest.php
Go to the documentation of this file.
1 <?php
7 
8 class XssOutputValidatorTest extends \PHPUnit\Framework\TestCase
9 {
15  public function testGetLinesWithXssSensitiveOutput($file, $expectedResults)
16  {
17  $xssOutputValidator = new XssOutputValidator();
18  $lines = $xssOutputValidator->getLinesWithXssSensitiveOutput($file);
19  static::assertEquals($expectedResults, $lines);
20  }
21 
26  {
27  $fixturePath = __DIR__ . '/_files/';
28  return [
29  'xss_safe' => [$fixturePath . 'xss_safe.phtml', ''],
30  'xss_unsafe' => [$fixturePath . 'xss_unsafe.phtml', '9,10,11,12,13,14,15,16,18,22,23'],
31  ];
32  }
33 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60