Skip to content

Commit 18028c0

Browse files
author
Oleksii Korshenko
committed
MAGETWO-81646: PHP Livecodetest testCodeStyle() method does not use whitelist files #11362
- revert workaround
1 parent 8c325eb commit 18028c0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,11 @@ private function getFullWhitelist()
199199

200200
public function testCodeStyle()
201201
{
202-
$whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1'
203-
? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']);
204-
202+
$isFullScan = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1';
205203
$reportFile = self::$reportDir . '/phpcs_report.txt';
206204
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
207-
$result = $codeSniffer->run($whiteList);
208-
$report = file_exists($reportFile) ? file_get_contents($reportFile) : '';
205+
$result = $codeSniffer->run($isFullScan ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']));
206+
$report = file_get_contents($reportFile);
209207
$this->assertEquals(
210208
0,
211209
$result,

0 commit comments

Comments
 (0)