ymmtmsys/command
Composer 安装命令:
composer require ymmtmsys/command
包简介
exec() wrapper
关键字:
README 文档
README
Command to facilitate the execution of external programs in unit testing.
Example
<?php use Ymmtmsys\Command\Command; class Foo { public function __construct($cmd) // $cmd is a Command instance { $this->cmd = $cmd; } public function bar() { // before process ... $this->cmd->exec($command); // after process ... } } class FooTest extends \PHPUnit_Framework_TestCase { public function testBar() { $mock_cmd = $this->getMock('Command', array('exec')); $obj = new Foo($mock_cmd); $obj->bar(); // Assertions } }
Copyright
Copyright (c) 2012 ymmtmsys. See LICENSE for further details.
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-10-07