silpo-tech / lib-test-utilities
Library for additional test utilities
v1.0.0
2025-08-19 12:39 UTC
Requires
- php: ^8.3
- ext-json: *
- sebastian/comparator: ^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.4|^12.0
README
About
Library Test Utilities contains additional test utilities for PHP projects.
Installation
Require package and its dependencies with composer:
composer require silpo-tech/lib-test-utilities --dev
Usage
Comparator
protected function setUp(): void { Factory::getInstance()->register( new IgnoreDynamicFieldsComparator(classes: [Recurring::class], properties: [ 'id', 'createdAt', 'updatedAt', ]), ); } protected function tearDown(): void { parent::tearDown(); Factory::getInstance()->reset(); }
Development
Tests
To run the test suite, you need to install the dependencies:
composer install
Run test suite:
composer test:run
Run test suite with coverage (requires pcov extension):
composer test:coverage
License
This project is licensed under the MIT License - see the LICENSE file for details.