<?php

namespace AuthStack\Driver\tests\units\Model;

use mageekguy\atoum;
use AuthStack\TwoFactor\Model\Key;
use AuthStack\Driver\Model\SecurityKey as Model;


class SecurityKey extends atoum
{
    function testRetrieval()
    {
        $this
            ->given($key = Model::findOrFail(1))
            ->then
                ->object($key)->isInstanceOf(Model::class)
                ->object($key->toKey())->isInstanceOf(Key::class)
                ->array($key->getAttribute('security_key'))->isNotEmpty()
        ;
    }
}