wyrihaximus / test-utilities
🛠️ Test utilities for api-clients packages
Fund package maintenance!
WyriHaximus
Installs: 789 655
Dependents: 65
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 1
Open Issues: 11
Requires
- php: ^8.3
- ecoapm/libyear: ^2.3
- ergebnis/composer-normalize: ^2.47.0
- ergebnis/phpunit-slow-test-detector: ^2.19.1
- icanhazstring/composer-unused: ^0.9.2
- infection/infection: ^0.29.14
- maglnet/composer-require-checker: ^4.16.1
- mockery/mockery: ^1.6.12
- php-coveralls/php-coveralls: ^2.7.0
- php-parallel-lint/php-console-highlighter: ^1.0
- php-parallel-lint/php-parallel-lint: ^1.4.0
- phpstan/phpstan: ^2.1.14
- phpunit/phpunit: ^12.1.4
- rector/rector: ^2.0.15
- roave/backward-compatibility-check: ^8.13.0
- squizlabs/php_codesniffer: ^3.12.2
- wyrihaximus/coding-standard: ^2.17.0
- wyrihaximus/phpstan-rules-wrapper: ^10.9.0
Requires (Dev)
- wyrihaximus/makefiles: ^0.4.2
Suggests
- wyrihaximus/async-test-utilities: The recommended addition to this package when building ReactPHP packages and projects.
- wyrihaximus/makefiles: Provides autogenerated Makefile utilizing all utilities provided through this package.
Conflicts
- composer/pcre: <3.3.2
- wyrihaximus/makefiles: <0.4.0
- dev-master
- 7.2.0
- 7.1.0
- 7.0.0
- 6.0.10
- 6.0.9
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.6.0
- 5.5.8
- 5.5.7
- 5.5.6
- 5.5.5
- 5.5.4
- 5.5.3
- 5.5.2
- 5.5.0
- 5.4.0
- 5.3.1
- 5.3.0
- 5.2.4
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.10
- 5.1.9
- 5.1.8
- 5.1.7
- 5.1.6
- 5.1.5
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.21
- 5.0.20
- 5.0.19
- 5.0.18
- 5.0.17
- 5.0.16
- 5.0.15
- 5.0.14
- 5.0.13
- 5.0.11
- 5.0.10
- 5.0.9
- 5.0.8
- 5.0.7
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.0
- 3.7.6
- 3.7.5
- 3.7.4
- 3.7.3
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.8
- 3.6.7
- 3.6.6
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.14
- 3.5.13
- 3.5.12
- 3.5.11
- 3.5.10
- 3.5.9
- 3.5.8
- 3.5.7
- 3.5.6
- 3.5.5
- 3.5.4
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.9.0
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 2.0.0-alpha2
- 2.0.0-alpha1
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-add-rector-and-phpstan-extension-to-documentation
- dev-add-rector
- dev-renovate/wyrihaximus-makefiles-0.x
- dev-add-roave-infection-static-analysis-plugin-back
- dev-Release-Management-should-run-in-order,-one-at-a-time
- dev-install-required-php-extensions-directly-on-the-os
- dev-use-continue-on-error-for-upcoming-PHP-releases
- dev-composer-unused-configuration-file
- dev-move-infection-also-to-etc-qa
- dev-use-call-on-windows
- dev-dependabot/composer/wyrihaximus/phpstan-rules-wrapper-1.2.4
- dev-phpunit-github-actions-printer
This package is auto-updated.
Last update: 2025-05-05 18:20:41 UTC
README
Installation
To install via Composer, use the command below, it will automatically detect the latest version and bind it with ^
.
composer require wyrihaximus/test-utilities
Usage
PHPStan
Some defaults to make working with this package easier with PHPStan have been added to exposed as an extension config.
PHPUnit
Any test file can extend WyriHaximus\TestUtilities\TestCase
and it comes with some goodies such as random namespaces
and random directories to use for file storage related tests.
Rector
A RectorConfig
is provided with defaults including where etc
, src
, and tests
are. It also converts all
doc tags to attributes that it's aware of.
<?php declare(strict_types=1); use WyriHaximus\TestUtilities\RectorConfig; return RectorConfig::configure(dirname(__DIR__, 2));
License
The MIT License (MIT)
Copyright (c) 2025 Cees-Jan Kiewiet
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.