Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
seriquynh committed Aug 12, 2019
1 parent cf5e364 commit 42b16bf
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions tests/Routing/RoutingUrlGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class RoutingUrlGeneratorTest extends TestCase
public function testBasicGeneration()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
new RouteCollection,
Request::create('http://www.foo.com/')
);

$this->assertEquals('http://www.foo.com/foo/bar', $url->to('foo/bar'));
Expand All @@ -30,8 +30,8 @@ public function testBasicGeneration()
* Test HTTPS request URL generation...
*/
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('https://www.foo.com/')
new RouteCollection,
Request::create('https://www.foo.com/')
);

$this->assertEquals('https://www.foo.com/foo/bar', $url->to('foo/bar'));
Expand All @@ -40,8 +40,8 @@ public function testBasicGeneration()
* Test asset URL generation...
*/
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/index.php/')
new RouteCollection,
Request::create('http://www.foo.com/index.php/')
);

$this->assertEquals('http://www.foo.com/foo/bar', $url->asset('foo/bar'));
Expand All @@ -52,7 +52,7 @@ public function testBasicGenerationWithHostFormatting()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], '/named-route', ['as' => 'plain']);
Expand Down Expand Up @@ -129,7 +129,7 @@ public function testBasicGenerationWithPathFormatting()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], '/named-route', ['as' => 'plain']);
Expand All @@ -147,7 +147,7 @@ public function testUrlFormattersShouldReceiveTargetRoute()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://abc.com/')
Request::create('http://abc.com/')
);

$namedRoute = new Route(['GET'], '/bar', ['as' => 'plain', 'root' => 'bar.com', 'path' => 'foo']);
Expand All @@ -169,7 +169,7 @@ public function testBasicRouteGeneration()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

/*
Expand Down Expand Up @@ -262,7 +262,7 @@ public function testFluentRouteNameDefinitions()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

/*
Expand All @@ -280,7 +280,7 @@ public function testControllerRoutesWithADefaultNamespace()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$url->setRootControllerNamespace('namespace');
Expand All @@ -306,7 +306,7 @@ public function testControllerRoutesOutsideOfDefaultNamespace()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$url->setRootControllerNamespace('namespace');
Expand All @@ -325,7 +325,7 @@ public function testRoutableInterfaceRouting()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], 'foo/{bar}', ['as' => 'routable']);
Expand All @@ -341,7 +341,7 @@ public function testRoutableInterfaceRoutingWithSingleParameter()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], 'foo/{bar}', ['as' => 'routable']);
Expand All @@ -357,7 +357,7 @@ public function testRoutesMaintainRequestScheme()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('https://www.foo.com/')
Request::create('https://www.foo.com/')
);

/*
Expand All @@ -373,7 +373,7 @@ public function testHttpOnlyRoutes()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('https://www.foo.com/')
Request::create('https://www.foo.com/')
);

/*
Expand All @@ -389,7 +389,7 @@ public function testRoutesWithDomains()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], 'foo/bar', ['as' => 'foo', 'domain' => 'sub.foo.com']);
Expand All @@ -410,7 +410,7 @@ public function testRoutesWithDomainsAndPorts()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com:8080/')
Request::create('http://www.foo.com:8080/')
);

$route = new Route(['GET'], 'foo/bar', ['as' => 'foo', 'domain' => 'sub.foo.com']);
Expand All @@ -433,7 +433,7 @@ public function testRoutesWithDomainsStripsProtocols()
*/
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$route = new Route(['GET'], 'foo/bar', ['as' => 'foo', 'domain' => 'http://sub.foo.com']);
Expand All @@ -446,7 +446,7 @@ public function testRoutesWithDomainsStripsProtocols()
*/
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('https://www.foo.com/')
Request::create('https://www.foo.com/')
);

$route = new Route(['GET'], 'foo/bar', ['as' => 'foo', 'domain' => 'https://sub.foo.com']);
Expand All @@ -459,7 +459,7 @@ public function testHttpsRoutesWithDomains()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('https://foo.com/')
Request::create('https://foo.com/')
);

/*
Expand All @@ -477,7 +477,7 @@ public function testRoutesWithDomainsThroughProxy()

$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/', 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1', 'HTTP_X_FORWARDED_PORT' => '80'])
Request::create('http://www.foo.com/', 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1', 'HTTP_X_FORWARDED_PORT' => '80'])
);

$route = new Route(['GET'], 'foo/bar', ['as' => 'foo', 'domain' => 'sub.foo.com']);
Expand All @@ -492,7 +492,7 @@ public function testUrlGenerationForControllersRequiresPassingOfRequiredParamete

$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com:8080/')
Request::create('http://www.foo.com:8080/')
);

$route = new Route(['GET'], 'foo/{one}/{two?}/{three?}', ['as' => 'foo', function () {
Expand All @@ -507,7 +507,7 @@ public function testForceRootUrl()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$url->forceRootUrl('https://www.bar.com');
Expand All @@ -522,7 +522,7 @@ public function testForceRootUrl()
*/
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
Request::create('http://www.foo.com/')
);

$url->forceScheme('https');
Expand All @@ -538,8 +538,8 @@ public function testForceRootUrl()
public function testPrevious()
{
$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
new RouteCollection,
Request::create('http://www.foo.com/')
);

$url->getRequest()->headers->set('referer', 'http://www.bar.com/');
Expand All @@ -557,8 +557,8 @@ public function testRouteNotDefinedException()
$this->expectExceptionMessage('Route [not_exists_route] not defined.');

$url = new UrlGenerator(
$routes = new RouteCollection,
$request = Request::create('http://www.foo.com/')
new RouteCollection,
Request::create('http://www.foo.com/')
);

$url->route('not_exists_route');
Expand Down

0 comments on commit 42b16bf

Please sign in to comment.