feedtailor/mocking-method-invoker
Composer 安装命令:
composer require feedtailor/mocking-method-invoker
包简介
Any methods invoker for Mock object.
README 文档
README
Any methods invoker for Mock object.
Install
Add feedtailor/mocking-method-invoker as a dependency in your project's composer.json file.
{
"require": {
"feedtailor/mocking-method-invoker": "dev-master"
}
}
Example
use Feedtailor\Mocking\MethodInvoker; class ExampleClass { protected function add($a, $b) { return $a + $b; } } $obj = new ExampleClass(); $result = MethodInvoker::create($obj)->invoke("getFoo", array(40, 2)) // got 42.
Methods
$invoker = new MethodInvoker($obj);
$invoker = MethodInvoker::create($obj);
Create a new MethodInvoker instance.
$invoker->invoke($name, $args);
invoke the $name method with $args array arguments.
License
Licensed under the MIT License.
统计信息
- 总下载量: 126
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-05