Skip to content

Commit 2f189c0

Browse files
committed
MAGETWO-94083: Impossible get information about static errors on PR
- create empty report file for the case when there no php and phtml files
1 parent 50503f2 commit 2f189c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,11 @@ public function testCodeStyle()
260260
{
261261
$isFullScan = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1';
262262
$reportFile = self::$reportDir . '/phpcs_report.txt';
263+
if (!file_exists($reportFile)) {
264+
touch($reportFile);
265+
}
263266
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
264-
$result = $codeSniffer->run($isFullScan ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']));
267+
$result = $codeSniffer->run($isFullScan ? $this->getFullWhitelist() : []);
265268
$report = file_get_contents($reportFile);
266269
$this->assertEquals(
267270
0,

0 commit comments

Comments
 (0)