PHPUnit assertions for PSR-compliant components, implemented as reusable traits.
Warning
This project is not finished yet, work in progress.
You can install the package via composer:
composer require ghostwriter/psr-phpunit-assertions --dev
You can also star (🌟) this repo to find it easier later.
<?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;
}
Please see docs/README.md
Please see CHANGELOG.md for more information on what has changed recently.
Please see LICENSE for more information on the license that applies to this project.
Please see SECURITY.md for more information on security disclosure process.