Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit f59cfe2

Browse files
author
Oleksii Korshenko
committed
MAGETWO-81646: PHP Livecodetest testCodeStyle() method does not use whitelist files #11362
1 parent 2f22260 commit f59cfe2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,12 @@ public function testCodeStyle()
206206

207207
$reportFile = self::$reportDir . '/phpcs_report.txt';
208208
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
209+
$result = $codeSniffer->run($whiteList);
210+
$report = file_exists($reportFile) ? file_get_contents($reportFile) : '';
209211
$this->assertEquals(
210212
0,
211-
$result = $codeSniffer->run($whiteList),
212-
"PHP Code Sniffer detected {$result} violation(s): " . PHP_EOL . file_get_contents($reportFile)
213+
$result,
214+
"PHP Code Sniffer detected {$result} violation(s): " . PHP_EOL . $report
213215
);
214216
}
215217

0 commit comments

Comments
 (0)