Skip to content

Commit

Permalink
MAGETWO-81646: PHP Livecodetest testCodeStyle() method does not use w…
Browse files Browse the repository at this point in the history
…hitelist files #11362

 - revert workaround
  • Loading branch information
Oleksii Korshenko committed Jan 31, 2018
1 parent 8c325eb commit 18028c0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,11 @@ private function getFullWhitelist()

public function testCodeStyle()
{
$whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1'
? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']);

$isFullScan = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1';
$reportFile = self::$reportDir . '/phpcs_report.txt';
$codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper());
$result = $codeSniffer->run($whiteList);
$report = file_exists($reportFile) ? file_get_contents($reportFile) : '';
$result = $codeSniffer->run($isFullScan ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']));
$report = file_get_contents($reportFile);
$this->assertEquals(
0,
$result,
Expand Down

0 comments on commit 18028c0

Please sign in to comment.