Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 1.48 KB

internals.md

File metadata and controls

70 lines (47 loc) · 1.48 KB

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

# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
make build v=8.1

Unit testing

# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
make test v=8.1

Mutation testing

# {{ 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. To run tests:

./vendor/bin/phpunit

Mutation testing

The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:

./vendor/bin/roave-infection-static-analysis-plugin

Static analysis

The code is statically analyzed with Psalm. To run static analysis:

./vendor/bin/psalm

Code style

Use Rector to make codebase follow some specific rules or use either newest or any specific version of PHP:

./vendor/bin/rector

Dependencies

This package uses composer-require-checker to check if all dependencies are correctly defined in composer.json. To run the checker, execute the following command:

./vendor/bin/composer-require-checker