<?php

namespace AuthStack\OAuth2\Model\Protocol\Grant\tests\units;


use mageekguy\atoum;

use AuthStack\OAuth2\Model\Protocol\Grant\AuthorizationCode;
use AuthStack\OAuth2\Model\Protocol\Grant\ClientCredentials;
use AuthStack\OAuth2\Model\Protocol\Grant\Implicit;
use AuthStack\OAuth2\Model\Protocol\Grant\PasswordCredentials;
use AuthStack\OAuth2\Model\Protocol\Grant\GrantFactory as Factory;

class GrantFactory extends atoum\test
{
    public function testAuthorizationRequest()
    {
        $this->given($factory = new Factory())
            ->then
                ->object($factory)->isInstanceOf(Factory::class)
                ->object($factory->authorizationCode())->isInstanceOf(AuthorizationCode::class)
                ->object($factory->implicit())->isInstanceOf(Implicit::class)
                ->object($factory->clientCredentials())->isInstanceOf(ClientCredentials::class)
                ->object($factory->passwordCredentials())->isInstanceOf(PasswordCredentials::class)
        ;
    }
}