Add basic client and token unit tests.

This commit is contained in:
GaryJones
2012-11-22 13:18:56 +00:00
parent 7ef4283511
commit 1f05207957
2 changed files with 42 additions and 0 deletions

20
tests/ClientTest.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
use GaryJones\OAuth\Client;
class ClientTest extends PHPUnit_Framework_TestCase
{
public function testKeyAndSecretAreSet()
{
$client = new Client('foo', 'bar');
$this->assertEquals('foo', $client->getKey());
$this->assertEquals('bar', $client->getSecret());
}
public function testCallbackUrlIsSet()
{
$client = new Client('foo', 'bar', 'http://example.com/foobar');
$this->assertEquals('http://example.com/foobar', $client->getCallbackUrl());
}
}