narrowspark/testing-helper
最新稳定版本:8.0.2
Composer 安装命令:
composer require narrowspark/testing-helper
包简介
Provides test helpers.
README 文档
README
Installation
Via Composer
$ composer require narrowspark/testing-helper
Usage
use Narrowspark\TestingHelper\Traits\AssertArrayTrait; class ModelTest extends \PHPUnit_Framework_TestCase { use AssertArrayTrait; // Now you can do something like this. public function testIfArrayContainIrix() { $haystack = ['Mac', 'NT', 'Irix', 'Linux']; self::assertInArray('Irix', $haystack); } // or public function testAssertArraySubsetThrowsExceptionForInvalidSubset(): void { $this->expectException(ExpectationFailedException::class); $this->assertArraySubset([6, 7], [1, 2, 3, 4, 5, 6]); } }
Testing
You need to run:
$ phpunit
Contributing
If you would like to help take a look at the list of issues and check our Contributing guild.
Note: Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 61.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 39
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-08