OAuth/tests/ConsumerTest.php
Jacob Kiers 8bd355f556 Use Interfaces anywhere.
In practice, there were still too many concrete classes, which makes
integration into a framework hard. To overcome this, the codebase has
been refactored to use Interfaces when a resource is needed.

All necessary Interfaces have been created, and the existing concrete
classes now implement these interfaces.
2013-02-11 14:02:14 +00:00

21 lines
549 B
PHP

<?php
use JacobKiers\OAuth\Consumer\Consumer;
class ConsumerTest extends PHPUnit_Framework_TestCase
{
public function testKeyAndSecretAreSet()
{
$consumer = new consumer('foo', 'bar');
$this->assertEquals('foo', $consumer->getKey());
$this->assertEquals('bar', $consumer->getSecret());
}
public function testCallbackUrlIsSet()
{
$consumer = new consumer('foo', 'bar', 'http://example.com/foobar');
$this->assertEquals('http://example.com/foobar', $consumer->getCallbackUrl());
}
}