File tree 3 files changed +14
-2
lines changed
testsuite/Magento/Test/Php 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 21
21
<php >
22
22
<ini name =" date.timezone" value =" America/Los_Angeles" />
23
23
<!-- 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 " />
25
25
</php >
26
26
</phpunit >
Original file line number Diff line number Diff line change 31
31
<php >
32
32
<ini name =" date.timezone" value =" America/Los_Angeles" />
33
33
<!-- 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 " />
35
35
<!-- TESTS_COMPOSER_PATH - specify the path to composer binary, if a relative reference cannot be resolved -->
36
36
<!-- <const name="TESTS_COMPOSER_PATH" value="/usr/local/bin/composer"/>-->
37
37
</php >
Original file line number Diff line number Diff line change @@ -256,10 +256,16 @@ private function getFullWhitelist()
256
256
}
257
257
}
258
258
259
+ /**
260
+ * Test code quality using phpcs
261
+ */
259
262
public function testCodeStyle ()
260
263
{
261
264
$ isFullScan = defined ('TESTCODESTYLE_IS_FULL_SCAN ' ) && TESTCODESTYLE_IS_FULL_SCAN === '1 ' ;
262
265
$ reportFile = self ::$ reportDir . '/phpcs_report.txt ' ;
266
+ if (!file_exists ($ reportFile )) {
267
+ touch ($ reportFile );
268
+ }
263
269
$ codeSniffer = new CodeSniffer ('Magento ' , $ reportFile , new Wrapper ());
264
270
$ result = $ codeSniffer ->run ($ isFullScan ? $ this ->getFullWhitelist () : self ::getWhitelist (['php ' , 'phtml ' ]));
265
271
$ report = file_get_contents ($ reportFile );
@@ -270,6 +276,9 @@ public function testCodeStyle()
270
276
);
271
277
}
272
278
279
+ /**
280
+ * Test code quality using phpmd
281
+ */
273
282
public function testCodeMess ()
274
283
{
275
284
$ reportFile = self ::$ reportDir . '/phpmd_report.txt ' ;
@@ -298,6 +307,9 @@ public function testCodeMess()
298
307
}
299
308
}
300
309
310
+ /**
311
+ * Test code quality using phpcpd
312
+ */
301
313
public function testCopyPaste ()
302
314
{
303
315
$ reportFile = self ::$ reportDir . '/phpcpd_report.xml ' ;
You can’t perform that action at this time.
0 commit comments