public function testCheckRestrictedGrantType() { $client = new Client(); $client->setAllowedGrantTypes(array('foo', 'bar')); $this->assertTrue($this->storage->checkRestrictedGrantType($client, 'foo')); $this->assertTrue($this->storage->checkRestrictedGrantType($client, 'bar')); $this->assertFalse($this->storage->checkRestrictedGrantType($client, 'baz')); }
/** * Construct */ public function __construct() { parent::__construct(); $this->allowedGrantTypes = array(OAuth2::GRANT_TYPE_AUTH_CODE, OAuth2::GRANT_TYPE_REFRESH_TOKEN); $this->users = new ArrayCollection(); }