diff --git a/dev/tests/static/phpunit-all.xml.dist b/dev/tests/static/phpunit-all.xml.dist index a77f536980c59..131cfa6a5ff60 100644 --- a/dev/tests/static/phpunit-all.xml.dist +++ b/dev/tests/static/phpunit-all.xml.dist @@ -19,5 +19,7 @@ + + diff --git a/dev/tests/static/phpunit.xml.dist b/dev/tests/static/phpunit.xml.dist index 6ccb9603000a0..1ae9342598e4b 100644 --- a/dev/tests/static/phpunit.xml.dist +++ b/dev/tests/static/phpunit.xml.dist @@ -29,6 +29,8 @@ + + diff --git a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php index f3dc7841d2df8..5058ef402cbd2 100644 --- a/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Magento/Test/Php/LiveCodeTest.php @@ -201,11 +201,14 @@ private function getFullWhitelist() public function testCodeStyle() { + $whiteList = defined('TESTCODESTYLE_IS_FULL_SCAN') && TESTCODESTYLE_IS_FULL_SCAN === '1' + ? $this->getFullWhitelist() : self::getWhitelist(['php', 'phtml']); + $reportFile = self::$reportDir . '/phpcs_report.txt'; $codeSniffer = new CodeSniffer('Magento', $reportFile, new Wrapper()); $this->assertEquals( 0, - $result = $codeSniffer->run($this->getFullWhitelist()), + $result = $codeSniffer->run($whiteList), "PHP Code Sniffer detected {$result} violation(s): " . PHP_EOL . file_get_contents($reportFile) ); }