Pantheon\Terminus\UnitTests\Commands\Auth\MachineTokensListCommandTest::testMachineTokenListEmpty PHP Method

testMachineTokenListEmpty() public method

Tests the machine-token:list command when there are no tokens
    public function testMachineTokenListEmpty()
    {
        $this->machine_tokens->method('all')->willReturn([]);
        $this->logger->expects($this->once())->method('log')->with($this->equalTo('warning'), $this->equalTo('You have no machine tokens.'));
        $out = $this->command->listTokens();
        $this->assertInstanceOf('Consolidation\\OutputFormatters\\StructuredData\\RowsOfFields', $out);
        $this->assertEquals([], $out->getArrayCopy());
    }