File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
testsuite/Magento/Test/Php Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2121 <php >
2222 <ini name =" date.timezone" value =" America/Los_Angeles" />
2323 <!-- TESTCODESTYLE_IS_FULL_SCAN - specify if full scan should be performed for test code style test -->
24- <const name =" TESTCODESTYLE_IS_FULL_SCAN" value =" 1 " />
24+ <const name =" TESTCODESTYLE_IS_FULL_SCAN" value =" 0 " />
2525 </php >
2626</phpunit >
Original file line number Diff line number Diff line change 3131 <php >
3232 <ini name =" date.timezone" value =" America/Los_Angeles" />
3333 <!-- TESTCODESTYLE_IS_FULL_SCAN - specify if full scan should be performed for test code style test -->
34- <const name =" TESTCODESTYLE_IS_FULL_SCAN" value =" 1 " />
34+ <const name =" TESTCODESTYLE_IS_FULL_SCAN" value =" 0 " />
3535 <!-- TESTS_COMPOSER_PATH - specify the path to composer binary, if a relative reference cannot be resolved -->
3636 <!-- <const name="TESTS_COMPOSER_PATH" value="/usr/local/bin/composer"/>-->
3737 </php >
Original file line number Diff line number Diff line change @@ -256,10 +256,16 @@ private function getFullWhitelist()
256256 }
257257 }
258258
259+ /**
260+ * Test code quality using phpcs
261+ */
259262 public function testCodeStyle ()
260263 {
261264 $ isFullScan = defined ('TESTCODESTYLE_IS_FULL_SCAN ' ) && TESTCODESTYLE_IS_FULL_SCAN === '1 ' ;
262265 $ reportFile = self ::$ reportDir . '/phpcs_report.txt ' ;
266+ if (!file_exists ($ reportFile )) {
267+ touch ($ reportFile );
268+ }
263269 $ codeSniffer = new CodeSniffer ('Magento ' , $ reportFile , new Wrapper ());
264270 $ result = $ codeSniffer ->run ($ isFullScan ? $ this ->getFullWhitelist () : self ::getWhitelist (['php ' , 'phtml ' ]));
265271 $ report = file_get_contents ($ reportFile );
@@ -270,6 +276,9 @@ public function testCodeStyle()
270276 );
271277 }
272278
279+ /**
280+ * Test code quality using phpmd
281+ */
273282 public function testCodeMess ()
274283 {
275284 $ reportFile = self ::$ reportDir . '/phpmd_report.txt ' ;
@@ -298,6 +307,9 @@ public function testCodeMess()
298307 }
299308 }
300309
310+ /**
311+ * Test code quality using phpcpd
312+ */
301313 public function testCopyPaste ()
302314 {
303315 $ reportFile = self ::$ reportDir . '/phpcpd_report.xml ' ;
You can’t perform that action at this time.
0 commit comments