Add basic client and token unit tests.
This commit is contained in:
20
tests/ClientTest.php
Normal file
20
tests/ClientTest.php
Normal 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());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user