mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 08:58:49 +00:00
Add explicit dependencies to twitter addon
This commit is contained in:
parent
01738518a2
commit
d18bb44f8a
45 changed files with 6653 additions and 14 deletions
51
twitter/vendor/abraham/twitteroauth/tests/AbstractSignatureMethodTest.php
vendored
Normal file
51
twitter/vendor/abraham/twitteroauth/tests/AbstractSignatureMethodTest.php
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace Abraham\TwitterOAuth\Tests;
|
||||
|
||||
use Abraham\TwitterOAuth\SignatureMethod;
|
||||
|
||||
abstract class AbstractSignatureMethodTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* @return SignatureMethod
|
||||
*/
|
||||
abstract public function getClass();
|
||||
|
||||
abstract protected function signatureDataProvider();
|
||||
|
||||
public function testGetName()
|
||||
{
|
||||
$this->assertEquals($this->name, $this->getClass()->getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider signatureDataProvider
|
||||
*/
|
||||
public function testBuildSignature($expected, $request, $consumer, $token)
|
||||
{
|
||||
$this->assertEquals($expected, $this->getClass()->buildSignature($request, $consumer, $token));
|
||||
}
|
||||
|
||||
protected function getRequest()
|
||||
{
|
||||
return $this->getMockBuilder('Abraham\TwitterOAuth\Request')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
|
||||
protected function getConsumer($key = null, $secret = null, $callbackUrl = null)
|
||||
{
|
||||
return $this->getMockBuilder('Abraham\TwitterOAuth\Consumer')
|
||||
->setConstructorArgs([$key, $secret, $callbackUrl])
|
||||
->getMock();
|
||||
}
|
||||
|
||||
protected function getToken($key = null, $secret = null)
|
||||
{
|
||||
return $this->getMockBuilder('Abraham\TwitterOAuth\Token')
|
||||
->setConstructorArgs([$key, $secret])
|
||||
->getMock();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue