Add test for NullToken.

This commit is contained in:
GaryJones 2012-11-23 12:20:23 +00:00
parent d94446782a
commit 7457f612b7

View File

@ -1,6 +1,7 @@
<?php
use GaryJones\OAuth\Token;
use GaryJones\OAuth\NullToken;
use GaryJones\OAuth\Util;
class TokenTest extends PHPUnit_Framework_TestCase
@ -19,4 +20,11 @@ class TokenTest extends PHPUnit_Framework_TestCase
'&oauth_token_secret=' . Util::urlencodeRfc3986('bar');
$this->assertEquals($string, $token->toString());
}
public function testNullTokenKeyAndSecretAreEmpty()
{
$token = new NullToken();
$this->assertEmpty($token->getKey());
$this->assertEmpty($token->getSecret());
}
}