public function runLocalCommand()
{
$testfile = tempnam(sys_get_temp_dir(), __FUNCTION__);
$command = new Command(new LocalConnection(), 'echo -n ' . escapeshellarg('Hello World') . ' > ' . $testfile);
$this->assertEquals("echo -n 'Hello World' > {$testfile}", $command->__toString());
$command->exec();
$this->assertEquals('Hello World', file_get_contents($testfile));
unlink($testfile);
}