Skip to content

Instantly share code, notes, and snippets.

@mageekguy
Created March 30, 2012 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mageekguy/2255009 to your computer and use it in GitHub Desktop.
Save mageekguy/2255009 to your computer and use it in GitHub Desktop.
public function testExecute()
{
$this->mockGenerator->shunt('__construct');
$socket = new \mock\socket();
$socket->getMockController()->write = function() {};
new command($socket))->execute();
$this->mock($socket)
->call('write')
->withArguments('vc', array(00, 0x01), 6)
->once()
;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment