try/predict-is
Composer 安装命令:
composer require try/predict-is
包简介
Simple comparison prediction for scalar values
README 文档
README
Simple comparison prediction for scalar values
Install
$ composer require try/predict-is
Usage
<?php require_once '/path/to/autoload.php'; use TryPhp\PredictIsTrait; $assertions = new class() { use PredictIsTrait(); } $assertions->is(3, 3); // won't throw an exception $assertions->predictException('something', 'something else'); // will throw an exception
API
Methods
is($actual, $expected)
Method to compare scalar values and throw an Exception if they do not equal.
Arguments
| Arguments | Type | Description |
|---|---|---|
| $actual | mixed |
Actual value that shall be checked. |
| $expected | mixed |
Expected value $actual is compared to. |
Related packages
License
GPL-2.0 © Willi Eßer
统计信息
- 总下载量: 77
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-10-26