Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.phpunit.result.cache
/composer.lock
/phpstan.neon
/var
/vendor
7 changes: 7 additions & 0 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ To run a single test use PHPUnit's `--filter` option:
ddev exec phpunit ./tests --debug --filter=testCannotProtectNonComposerRepository
```

### Checking code coverage

```
ddev xdebug
ddev composer coverage
```

## Linting and fixing

Linting for syntax, then style:
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"slevomat/coding-standard": "^8.28"
},
"scripts": {
"coverage": [
"@putenv XDEBUG_MODE=coverage",
"phpunit --coverage-text --color=always --testdox"
],
"phpcs": "phpcs",
"phpcbf": "phpcbf",
"phpstan": "phpstan",
Expand Down
17 changes: 17 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<phpunit
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true">
<testsuites>
<testsuite name="Tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage cacheDirectory="var/phpunit/coverage-cache" processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
Loading