2013-02-05 01:16:29 +05:30
|
|
|
<?php
|
|
|
|
|
2014-05-03 15:25:25 +05:30
|
|
|
namespace LeagueTests\util;
|
2014-01-16 22:20:30 +05:30
|
|
|
|
|
|
|
use League\OAuth2\Server\Util\RedirectUri;
|
|
|
|
|
|
|
|
class RedirectUriTest extends \PHPUnit_Framework_TestCase
|
2013-02-05 01:16:29 +05:30
|
|
|
{
|
2014-05-03 15:25:25 +05:30
|
|
|
public function testMake()
|
|
|
|
{
|
|
|
|
$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
|
|
|
|
2014-05-03 15:25:25 +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);
|
|
|
|
}
|
|
|
|
}
|