<?php
namespace League\OAuth1\Client\Tests;
use Generator;
use League\OAuth1\Client\Server\Twitter;
use PHPUnit\Framework\TestCase;
class TwitterServerTest extends TestCase
{
public function sampleTemporaryCredentialUrls(): Generator
{
yield 'No application scope' => [
null, 'https://api.twitter.com/oauth/request_token',
];
yield "Read" => [
'read', 'https://api.twitter.com/oauth/request_token?x_auth_access_type=read',
];
yield "Write" => [
'write', 'https://api.twitter.com/oauth/request_token?x_auth_access_type=write',
];
}
/** @dataProvider sampleTemporaryCredentialUrls */
public function testItProvidesNoApplicationScopeByDefault(?string $applicationScope, string $url): void
{
$twitter = new Twitter([
'identifier' => 'mykey',
'secret' => 'mysecret',
'callback_uri' => 'http://app.dev/',
'scope' => $applicationScope,
]);
self::assertEquals($url, $twitter->urlTemporaryCredentials());
}
}
How To Payment
Making a payment on our website is quick and secure. Start by logging in or creating an account. Select your preferred payment method, input the required details, and review the information. Once you confirm everything is correct, click on the "Submit Payment" button. You’ll receive instant confirmation and can track your payment status through your account dashboard. It’s an easy and secure process.