Pantheon\Terminus\UnitTests\Commands\DrushCommandTest::testDrushCommand PHP Method

testDrushCommand() public method

Tests the drush command
public testDrushCommand ( )
    public function testDrushCommand()
    {
        $command = $this->getMockBuilder(DrushCommand::class)->disableOriginalConstructor()->setMethods(['prepareEnvironment', 'executeCommand'])->getMock();
        $command->expects($this->once())->method('prepareEnvironment')->with($this->equalTo('dummy-site.dummy-env'));
        $command->expects($this->once())->method('executeCommand')->willReturn('command output');
        $output = $command->drushCommand('dummy-site.dummy-env', ['drushable', 'command', 'arguments']);
        $this->assertEquals('command output', $output);
    }
DrushCommandTest