ghostwriter / psr-phpunit-assertions
PHPUnit assertions for PSR-compliant components, implemented as reusable traits.
Fund package maintenance!
ghostwriter
Installs: 1 452
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.4
- fig/http-message-util: ^1.1.5
- phpunit/phpunit: ^12.0.7
- psr/cache: ^3.0.0
- psr/clock: ^1.0.0
- psr/container: ^2.0.2
- psr/event-dispatcher: ^1.0.0
- psr/http-client: ^1.0.3
- psr/http-factory: ^1.1.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0.2
- psr/http-server-middleware: ^1.0.2
- psr/link: ^2.0.1
- psr/log: ^3.0.2
- psr/simple-cache: ^3.0.0
Requires (Dev)
- ghostwriter/coding-standard: dev-main
This package is auto-updated.
Last update: 2025-03-12 04:05:03 UTC
README
PHPUnit assertions for PSR-compliant components, implemented as reusable traits.
Warning
This project is not finished yet, work in progress.
Installation
You can install the package via composer:
composer require ghostwriter/psr-phpunit-assertions --dev
Star ⭐️ this repo if you find it useful
You can also star (🌟) this repo to find it easier later.
Usage
<?php declare(strict_types=1); // use all the traits provided use \Ghostwriter\PsrPhpunitAssertions\AssertionsTrait; final class ExampleOneTest extends AbstractTestCase { use AssertionsTrait; } // or mix and match the trait you need. use \Ghostwriter\PsrPhpunitAssertions\CacheTrait; use \Ghostwriter\PsrPhpunitAssertions\ClockTrait; use \Ghostwriter\PsrPhpunitAssertions\ContainerTrait; use \Ghostwriter\PsrPhpunitAssertions\EventDispatcherTrait; use \Ghostwriter\PsrPhpunitAssertions\HttpTrait; use \Ghostwriter\PsrPhpunitAssertions\LinkTrait; use \Ghostwriter\PsrPhpunitAssertions\LogTrait; use \Ghostwriter\PsrPhpunitAssertions\SimpleCacheTrait; final class ExampleTest extends AbstractTestCase { use CacheTrait; use ClockTrait; use ContainerTrait; use EventDispatcherTrait; use HttpTrait; use LinkTrait; use LogTrait; use SimpleCacheTrait; }
Docs
Please see docs/README.md
Credits
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
License
Please see LICENSE for more information on the license that applies to this project.
Security
Please see SECURITY.md for more information on security disclosure process.