Pantheon\Terminus\UnitTests\HTTPS\RemoveCommandTest::testRemove PHP Method

testRemove() public method

Tests the https:remove command
public testRemove ( )
    public function testRemove()
    {
        $workflow = $this->getMockBuilder(Workflow::class)->disableOriginalConstructor()->getMock();
        // workflow succeeded
        $workflow->expects($this->once())->method('checkProgress')->willReturn(true);
        $workflow->expects($this->once())->method('getMessage')->willReturn('successful workflow');
        $this->environment->expects($this->once())->method('disableHttpsCertificate');
        $this->environment->expects($this->once())->method('convergeBindings')->willReturn($workflow);
        // should display a notice about the mode switch
        $this->logger->expects($this->at(0))->method('log')->with($this->equalTo('notice'), $this->equalTo('HTTPS has been disabled and the environment\'s bindings will now be converged.'));
        $this->logger->expects($this->at(1))->method('log')->with($this->equalTo('notice'), $this->equalTo('successful workflow'));
        $this->command->remove('mysite.dev');
    }