Skip to content

Commit c5c1f9c

Browse files
committed
remove invalid basename calls
1 parent 62074a0 commit c5c1f9c

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

Tests/Functional/Controller/RedirectControllerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\Controller;
44

5+
use PHPCR\Util\PathHelper;
56
use Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\BaseTestCase;
67

78
use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -21,7 +22,7 @@ class RedirectControllerTest extends BaseTestCase
2122

2223
public static function setupBeforeClass(array $options = array(), $routebase = null)
2324
{
24-
parent::setupBeforeClass(array(), basename(self::ROUTE_ROOT));
25+
parent::setupBeforeClass(array(), PathHelper::getNodeName(self::ROUTE_ROOT));
2526
$router = self::$kernel->getContainer()->get('router');
2627
self::$controller = new RedirectController($router);
2728
}

Tests/Functional/Document/RedirectRouteTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\Document;
44

5+
use PHPCR\Util\PathHelper;
56
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
67
use Symfony\Cmf\Bundle\RoutingBundle\Document\RedirectRoute;
78

@@ -13,7 +14,7 @@ class RedirectRouteTest extends BaseTestCase
1314

1415
public static function setupBeforeClass(array $options = array(), $routebase = null)
1516
{
16-
parent::setupBeforeClass(array(), basename(self::ROUTE_ROOT));
17+
parent::setupBeforeClass(array(), PathHelper::getNodeName(self::ROUTE_ROOT));
1718
}
1819

1920
public function testRedirectDoctrine()

Tests/Functional/Document/RouteProviderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\Document;
44

55
use Doctrine\ODM\PHPCR\Document\Generic;
6+
use PHPCR\Util\PathHelper;
67
use Symfony\Component\HttpFoundation\Request;
78

89
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
@@ -19,7 +20,7 @@ class RouteRepositoryTest extends BaseTestCase
1920

2021
public static function setupBeforeClass(array $options = array(), $routebase = null)
2122
{
22-
parent::setupBeforeClass(array(), basename(self::ROUTE_ROOT));
23+
parent::setupBeforeClass(array(), PathHelper::getNodeName(self::ROUTE_ROOT));
2324
self::$repository = self::$kernel->getContainer()->get('cmf_routing.route_provider');
2425
}
2526

Tests/Functional/Document/RouteTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\Document;
44

5+
use PHPCR\Util\PathHelper;
56
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
67

78
use Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\BaseTestCase;
@@ -12,7 +13,7 @@ class RouteTest extends BaseTestCase
1213

1314
public static function setupBeforeClass(array $options = array(), $routebase = null)
1415
{
15-
parent::setupBeforeClass(array(), basename(self::ROUTE_ROOT));
16+
parent::setupBeforeClass(array(), PathHelper::getNodeName(self::ROUTE_ROOT));
1617
}
1718

1819
public function testPersist()

Tests/Functional/Routing/DynamicRouterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\Routing;
44

5+
use PHPCR\Util\PathHelper;
56
use Symfony\Component\HttpFoundation\Request;
67

78
use Symfony\Cmf\Bundle\RoutingBundle\Document\Route;
@@ -29,7 +30,7 @@ class DynamicRouterTest extends BaseTestCase
2930

3031
public static function setupBeforeClass(array $options = array(), $routebase = null)
3132
{
32-
parent::setupBeforeClass(array(), basename(self::ROUTE_ROOT));
33+
parent::setupBeforeClass(array(), PathHelper::getNodeName(self::ROUTE_ROOT));
3334
self::$router = self::$kernel->getContainer()->get('router');
3435

3536
$root = self::$dm->find(null, self::ROUTE_ROOT);

0 commit comments

Comments
 (0)