Pantheon\Terminus\UnitTests\Models\SSHKeyTest::testGetCommentHex PHP Method

testGetCommentHex() public method

public testGetCommentHex ( )
    public function testGetCommentHex()
    {
        $collection = $this->getMockBuilder(SSHKeys::class)->disableOriginalConstructor()->getMock();
        $collection->expects($this->once())->method('getUser')->willReturn((object) ['id' => '123']);
        $sshkey = new SSHKey((object) ['id' => '1234567890abcdef', 'key' => 'ssh-rsa AAAAB3xxx0uj+Q== [email protected]'], ['collection' => $collection]);
        $this->assertEquals('12:34:56:78:90:ab:cd:ef', $sshkey->getHex());
        $this->assertEquals('[email protected]', $sshkey->getComment());
    }