Pantheon\Terminus\UnitTests\Commands\Remove\WPCommandTest::testWPCommand PHP Method

testWPCommand() public method

Tests the wp command
public testWPCommand ( )
    public function testWPCommand()
    {
        $command = $this->getMockBuilder(WPCommand::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->wpCommand('dummy-site.dummy-env', ['wpcli', 'command', 'arguments']);
        $this->assertEquals('command output', $output);
    }
WPCommandTest