ymmtmsys / command
exec() wrapper
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
pkg:composer/ymmtmsys/command
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-10-25 18:51:53 UTC
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.