generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs folder standardization and other fixes (#33)
- Loading branch information
1 parent
85767c4
commit 9851595
Showing
4 changed files
with
88 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Internals | ||
|
||
> The tests use a connection to a running Redis cluster. If you are not using Docker, you must start the cluster yourself before running the tests. | ||
## Testing in Docker | ||
|
||
### Prepare | ||
|
||
```shell | ||
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1 | ||
make build v=8.1 | ||
``` | ||
|
||
### Unit testing | ||
|
||
```shell | ||
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1 | ||
make test v=8.1 | ||
``` | ||
|
||
### Mutation testing | ||
|
||
```shell | ||
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1 | ||
make mutation-test v=8.0 | ||
``` | ||
|
||
## Unit testing | ||
|
||
The package is tested with [PHPUnit](https://phpunit.de/). To run tests: | ||
|
||
```shell | ||
./vendor/bin/phpunit | ||
``` | ||
|
||
## Mutation testing | ||
|
||
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with | ||
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: | ||
|
||
```shell | ||
./vendor/bin/roave-infection-static-analysis-plugin | ||
``` | ||
|
||
## Static analysis | ||
|
||
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: | ||
|
||
```shell | ||
./vendor/bin/psalm | ||
``` | ||
|
||
## Rector | ||
|
||
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or | ||
use either newest or any specific version of PHP: | ||
|
||
```shell | ||
./vendor/bin/rector | ||
``` | ||
|
||
## Composer require checker | ||
|
||
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`. | ||
|
||
To run the checker, execute the following command: | ||
|
||
```shell | ||
./vendor/bin/composer-require-checker | ||
``` |