2017 © Pedro Peláez
 

library command

exec() wrapper

image

ymmtmsys/command

exec() wrapper

  • Wednesday, August 28, 2013
  • by ymmtmsys
  • Repository
  • 0 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Command

Command to facilitate the execution of external programs in unit testing., (*1)

Build Status, (*2)

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 (c) 2012 ymmtmsys. See LICENSE for further details., (*3)

The Versions

28/08 2013

dev-master

9999999-dev

exec() wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by YAMAMOTO Masayasu

object

27/08 2013

0.2.0

0.2.0.0

exec() wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by YAMAMOTO Masayasu

object

07/10 2012

0.1.0

0.1.0.0

exec() wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by YAMAMOTO Masayasu

object