2013-02-05 01:16:29 +05:30
|
|
|
<?php
|
|
|
|
|
2014-01-16 22:20:30 +05:30
|
|
|
namespace LeagueTests\Util;
|
|
|
|
|
|
|
|
use League\OAuth2\Server\Util\RedirectUri;
|
|
|
|
use \Mockery as M;
|
|
|
|
|
|
|
|
class RedirectUriTest extends \PHPUnit_Framework_TestCase
|
2013-02-05 01:16:29 +05:30
|
|
|
{
|
2014-01-16 22:20:30 +05:30
|
|
|
function testMake()
|
2013-02-05 01:16:29 +05:30
|
|
|
{
|
2014-01-16 22:20:30 +05:30
|
|
|
$v1 = RedirectUri::make('https://foobar/', array('foo'=>'bar'));
|
|
|
|
$v2 = RedirectUri::make('https://foobar/', array('foo'=>'bar'), '#');
|
|
|
|
$v3 = RedirectUri::make('https://foobar/', array('foo'=>'bar', 'bar' => 'foo'));
|
2013-02-05 01:16:29 +05:30
|
|
|
|
|
|
|
$this->assertEquals('https://foobar/?foo=bar', $v1);
|
|
|
|
$this->assertEquals('https://foobar/#foo=bar', $v2);
|
|
|
|
$this->assertEquals('https://foobar/?foo=bar&bar=foo', $v3);
|
|
|
|
}
|
|
|
|
}
|