public function testGetClient() { $client_bean = $this->redbean->dispense($this->tables['client']); $client = new \ebussola\oauth\client\Client($client_bean); $client->id = 1; $client->redirect_uris = array('localhost'); $client->client_secret = '823984y9ncy9ny4hh284c823'; $this->redbean->store($client->getBean()); $client = $this->redbean_storage->getClient($client_bean->id); $this->assertInstanceOf('\\ebussola\\oauth\\Client', $client); $this->assertEquals(array('localhost'), $client->redirect_uris); }
public function testUse() { $client = $this->storage->getClient(1); $access_token = $this->oauth2->createAccessToken($client, array()); $a = $this->oauth2->verifyAccessToken($access_token['access_token']); $this->assertInstanceOf('\\ebussola\\oauth\\AccessToken', $a); }