AwsInspector\Tests\Ssh\CommandTest::commandWithArguments PHP Method

commandWithArguments() public method

    public function commandWithArguments()
    {
        $connectionMock = $this->getMock('\\AwsInspector\\Ssh\\Connection', [], [], '', false);
        $connectionMock->method('__toString')->willReturn('connection');
        $command = new Command($connectionMock, 'echo ' . escapeshellarg('Hello World'));
        $this->assertEquals("connection 'echo '\\''Hello World'\\'''", $command->__toString());
    }