Pantheon\Terminus\UnitTests\Models\EnvironmentTest::testDisableHttpsCertificateFailed PHP Method

testDisableHttpsCertificateFailed() public method

    public function testDisableHttpsCertificateFailed()
    {
        $this->request->expects($this->at(0))->method('request')->with('sites/abc/environments/dev/settings', ['method' => 'get'])->willReturn(['data' => (object) ['ssl_enabled' => true]]);
        $this->request->expects($this->at(1))->method('request')->with('sites/abc/environments/dev/settings', ['method' => 'put', 'form_params' => ['ssl_enabled' => false, 'dedicated_ip' => false]])->will($this->throwException(new \Exception()));
        $this->setExpectedException(TerminusException::class, 'There was an problem disabling https for this environment.');
        $this->model->disableHttpsCertificate();
    }