public function testConstructorMinimumParameters() { $accessToken = new AccessToken(['token' => 'foo', 'type' => 'bearer', 'clientId' => '123', 'userId' => 'bar', 'lifetime' => 60]); $this->assertSame(['token' => 'foo', 'type' => 'bearer', 'clientId' => '123', 'userId' => 'bar', 'createdAt' => time(), 'lifetime' => 60, 'scope' => null], $accessToken->getParams()); }
public function testConstructorFullParameters() { $accessToken = new \Akamon\OAuth2\Server\Domain\Model\AccessToken\AccessToken(['token' => 'foo', 'type' => 'mac', 'clientId' => '123', 'userId' => 'bar', 'createdAt' => 2, 'lifetime' => 3600, 'scope' => 'bar,ups']); $this->assertSame(['token' => 'foo', 'type' => 'mac', 'clientId' => '123', 'userId' => 'bar', 'createdAt' => 2, 'lifetime' => 3600, 'scope' => 'bar,ups'], $accessToken->getParams()); }