定制 ghostwriter/psr-phpunit-assertions 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ghostwriter/psr-phpunit-assertions

Composer 安装命令:

composer require --dev ghostwriter/psr-phpunit-assertions

包简介

PHPUnit assertions for PSR-compliant components, implemented as reusable traits.

README 文档

README

GitHub Sponsors Automation Supported PHP Version Downloads

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.

统计信息

  • 总下载量: 149.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2025-03-05