fkooman\OAuth\Client\TokenRequestTest::setUp PHP Method

setUp() public method

public setUp ( )
    public function setUp()
    {
        $this->clientConfig = array();
        $this->tokenResponse = array();
        $this->clientConfig[] = new ClientConfig(array('client_id' => 'foo', 'client_secret' => 'bar', 'authorize_endpoint' => 'http://www.example.org/authorize', 'token_endpoint' => 'http://www.example.org/token'));
        $this->clientConfig[] = new ClientConfig(array('client_id' => 'foo', 'client_secret' => 'bar', 'authorize_endpoint' => 'http://www.example.org/authorize', 'token_endpoint' => 'http://www.example.org/token', 'redirect_uri' => 'http://foo.example.org/callback', 'credentials_in_request_body' => true));
        $this->clientConfig[] = new ClientConfig(array('client_id' => 'foo', 'client_secret' => 'bar', 'authorize_endpoint' => 'http://www.example.org/authorize', 'token_endpoint' => 'http://www.example.org/token', 'redirect_uri' => 'http://foo.example.org/callback', 'allow_string_expires_in' => true));
        $this->clientConfig[] = new ClientConfig(array('client_id' => 'foo', 'client_secret' => 'bar', 'authorize_endpoint' => 'http://www.example.org/authorize', 'token_endpoint' => 'http://www.example.org/token', 'redirect_uri' => 'http://foo.example.org/callback', 'use_array_scope' => true));
        $this->clientConfig[] = new ClientConfig(array('client_id' => 'foo', 'client_secret' => 'bar', 'authorize_endpoint' => 'http://www.example.org/authorize', 'token_endpoint' => 'http://www.example.org/token', 'redirect_uri' => 'http://foo.example.org/callback', 'use_comma_separated_scope' => true));
        $this->tokenResponse[] = json_encode(array('access_token' => 'foo', 'token_type' => 'Bearer'));
        $this->tokenResponse[] = '{';
        $this->tokenResponse[] = json_encode(array('access_token' => 'foo', 'token_type' => 'Bearer', 'expires_in' => '1200'));
        $this->tokenResponse[] = json_encode(array('access_token' => 'foo', 'token_type' => 'Bearer', 'scope' => array('foo', 'bar')));
        $this->tokenResponse[] = json_encode(array('access_token' => 'foo', 'token_type' => 'Bearer', 'scope' => 'foo,bar'));
    }