Skip to content

Commit fdd74b4

Browse files
Merge pull request #43 from magento-thunder/MAGECLOUD-1075
MAGECLOUD-1075: Add test coverage analysis
2 parents 8c6c81d + 9eca554 commit fdd74b4

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"squizlabs/php_codesniffer": " ^3.0",
2222
"doctrine/instantiator": "1.0.5",
2323
"phpmd/phpmd": "@stable",
24-
"php-mock/php-mock-phpunit": "^2.0"
24+
"php-mock/php-mock-phpunit": "^2.0",
25+
"phpunit/php-code-coverage": "^5.2"
2526
},
2627
"bin": [
2728
"m2-ece-build",
@@ -39,8 +40,8 @@
3940
"phpcs src --standard=tests/static/phpcs-ruleset.xml -p -n",
4041
"phpmd src xml tests/static/phpmd-ruleset.xml",
4142
"phpunit --configuration tests/unit/phpunit.xml.dist"
42-
]
43+
],
44+
"test-coverage": "phpunit --configuration tests/unit/phpunit.xml.dist --coverage-html tests/unit/tmp/coverage"
4345
},
44-
"process-timeout": 600,
4546
"prefer-stable": true
4647
}

src/Magento/MagentoCloud/App/Bootstrap.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
use Magento\MagentoCloud\Application;
99

10+
/**
11+
* Class Bootstrap.
12+
*
13+
* @codeCoverageIgnore
14+
*/
1015
class Bootstrap
1116
{
1217
/**

tests/unit/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tmp

tests/unit/phpunit.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
<directory suffix="Test.php">../../src/*/*/Test/Unit</directory>
1313
</testsuite>
1414
</testsuites>
15+
<filter>
16+
<whitelist addUncoveredFilesFromWhitelist="true">
17+
<directory suffix=".php">../../src/*/*</directory>
18+
<exclude>
19+
<directory>../../src/*/*/Test</directory>
20+
</exclude>
21+
</whitelist>
22+
</filter>
1523

1624
<php>
1725
<ini name="date.timezone" value="UTC"/>

0 commit comments

Comments
 (0)