Skip to content

Instantly share code, notes, and snippets.

@mageekguy
Created March 30, 2012 13:28
Show Gist options
  • Save mageekguy/2251561 to your computer and use it in GitHub Desktop.
Save mageekguy/2251561 to your computer and use it in GitHub Desktop.
public function testExecute()
{
$socket = $this->getMockBuilder('socket')
->disableOriginalConstructor()
->getMock()
;
$socket->expects($this->once())
->method('write')
->with(
$this->equalTo('vc'),
$this->equalTo(array(00,0x01)),
$this->equalTo(6)
)
;
$command = new command($socket);
$command->execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment