Add Symfony Deprecation Contracts package
- Created CHANGELOG.md to maintain version history. - Added README.md with usage instructions for the trigger_deprecation() function. - Initialized composer.json for the Symfony Deprecation Contracts library, specifying dependencies and autoloading.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php namespace League\OAuth2\Client\Test\Provider;
|
||||
|
||||
use Mockery as m;
|
||||
|
||||
class GithubResourceOwnerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testUrlIsNullWithoutDomainOrNickname()
|
||||
{
|
||||
$user = new \League\OAuth2\Client\Provider\GithubResourceOwner;
|
||||
|
||||
$url = $user->getUrl();
|
||||
|
||||
$this->assertNull($url);
|
||||
}
|
||||
|
||||
public function testUrlIsDomainWithoutNickname()
|
||||
{
|
||||
$domain = uniqid();
|
||||
$user = new \League\OAuth2\Client\Provider\GithubResourceOwner;
|
||||
$user->setDomain($domain);
|
||||
|
||||
$url = $user->getUrl();
|
||||
|
||||
$this->assertEquals($domain, $url);
|
||||
}
|
||||
|
||||
public function testUrlIsNicknameWithoutDomain()
|
||||
{
|
||||
$nickname = uniqid();
|
||||
$user = new \League\OAuth2\Client\Provider\GithubResourceOwner(['login' => $nickname]);
|
||||
|
||||
$url = $user->getUrl();
|
||||
|
||||
$this->assertEquals($nickname, $url);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user