Pantheon\Terminus\UnitTests\Commands\Auth\MachineTokenDeleteCommandTest::testMachineTokenDeleteNonExistant PHP Method

testMachineTokenDeleteNonExistant() public method

Tests the machine-token:delete command when there are no tokens.
    public function testMachineTokenDeleteNonExistant()
    {
        $token = $this->getMockBuilder(MachineToken::class)->disableOriginalConstructor()->getMock();
        $token->expects($this->never())->method('delete');
        $this->machine_tokens->expects($this->once())->method('get')->with($this->equalTo('123'))->will($this->throwException(new TerminusException()));
        $this->setExpectedException(TerminusException::class);
        $this->command->delete('123');
    }