silpo-tech/lib-test-utilities

Library for additional test utilities

v1.0.0 2025-08-19 12:39 UTC

This package is auto-updated.

Last update: 2025-09-24 13:16:28 UTC


README

CI codecov License: MIT

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.