 8bd355f556
			
		
	
	8bd355f556
	
	
	
		
			
			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.
		
			
				
	
	
		
			21 lines
		
	
	
		
			549 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			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());
 | |
|     }
 | |
| 
 | |
| }
 |