| 1 | <?php |
||
| 11 | class AccessTokenTest extends \Test\TestCase |
||
| 12 | { |
||
| 13 | public function testConstructMethod() |
||
| 14 | { |
||
| 15 | $token = new AccessToken('key', 'secret'); |
||
| 16 | $this->assertEquals('key', $token->getKey()); |
||
| 17 | $this->assertEquals('secret', $token->getSecret()); |
||
| 18 | |||
| 19 | return $token; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function testGetUserId() |
||
| 23 | { |
||
| 24 | $token = $this->testConstructMethod(); |
||
| 25 | $this->assertNull($token->getUserId()); |
||
| 26 | |||
| 27 | $userId = 12345; |
||
| 28 | $token->setUserId($userId); |
||
| 29 | $this->assertSame($userId, $token->getUserId()); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |