Pantheon\Terminus\UnitTests\Commands\NewRelic\DisableCommandTest::testDisable PHP Method

testDisable() public method

Tests the new-relic:disable command
public testDisable ( )
    public function testDisable()
    {
        $workflow = $this->getMockBuilder(Workflow::class)->disableOriginalConstructor()->getMock();
        $workflow->expects($this->once())->method('checkProgress')->with()->willReturn(true);
        $workflow->expects($this->once())->method('getMessage')->with()->willReturn('successful workflow');
        $this->new_relic->expects($this->once())->method('disable')->with();
        $this->site->expects($this->once())->method('converge')->willReturn($workflow);
        $this->logger->expects($this->at(0))->method('log')->with($this->equalTo('notice'), $this->equalTo('New Relic disabled. Converging bindings.'));
        $this->logger->expects($this->at(1))->method('log')->with($this->equalTo('notice'), $this->equalTo('successful workflow'));
        $out = $this->command->disable('mysite');
        $this->assertNull($out);
    }
DisableCommandTest