ajthinking/pest-plugin-testables
Composer 安装命令:
composer require --dev ajthinking/pest-plugin-testables
包简介
Easily test Builders
README 文档
README
Installation
composer require ajthinking/pest-plugin-testables --dev
Usage
test('it ignores excessive substraction', function() { testable(Inventory::class) ->setCount(1) ->substract(10) ->getCount()->assertEquals(0) ->add(2) ->getCount()->assertEquals(2) });
How it works:
- Provide
testablewith an instance or a resolvable classname. - Make preparatory calls as needed.
- Reach for the property or method you want to assert against.
- State the assertion. It will target the most recent operation.
- After an assertion, it will return to the state before the assertion target, making it possible to chain more assertions.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-22