Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 7f213e0

Browse files
michalbundyraweierophinney
authored andcommitted
Fixed test to work with Zend\Mvc\Router when zend-router v3 is removed
1 parent 286fa03 commit 7f213e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/Helper/UrlTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ protected function setUp()
7373
? WildcardRoute::class
7474
: NextGenWildcardRoute::class;
7575

76-
$routerClass = class_exists(Router::class)
76+
$this->routerClass = class_exists(Router::class)
7777
? Router::class
7878
: NextGenRouter::class;
7979

80-
$router = new $routerClass();
80+
$router = new $this->routerClass();
8181
$router->addRoute('home', [
8282
'type' => $this->literalRouteType,
8383
'options' => [
@@ -243,15 +243,15 @@ public function testRemovesModuleRouteListenerParamsWhenReusingMatchedParameters
243243

244244
public function testAcceptsNextGenRouterToSetRouter()
245245
{
246-
$router = new NextGenRouter();
246+
$router = new $this->routerClass();
247247
$url = new UrlHelper();
248248
$url->setRouter($router);
249249
$this->assertAttributeSame($router, 'router', $url);
250250
}
251251

252252
public function testAcceptsNextGenRouteMatche()
253253
{
254-
$routeMatch = new NextGenRouteMatch([]);
254+
$routeMatch = new $this->routeMatchType([]);
255255
$url = new UrlHelper();
256256
$url->setRouteMatch($routeMatch);
257257
$this->assertAttributeSame($routeMatch, 'routeMatch', $url);

0 commit comments

Comments
 (0)