Skip to content

Commit 0aa8838

Browse files
committed
Fixed tests after cleanup
1 parent 2324474 commit 0aa8838

18 files changed

+32
-30
lines changed

src/ChainRouter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ protected function sortRouters()
126126
{
127127
krsort($this->routers);
128128

129+
if (0 === count($this->routers)) {
130+
return array();
131+
}
132+
129133
return call_user_func_array('array_merge', $this->routers);
130134
}
131135

src/DynamicRouter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ protected function sortRouteEnhancers()
350350
{
351351
krsort($this->enhancers);
352352

353+
if (0 === count($this->enhancers)) {
354+
return array();
355+
}
356+
353357
return call_user_func_array('array_merge', $this->enhancers);
354358
}
355359

tests/Unit/Candidates/CandidatesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Candidates;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Candidates;
1313

1414
use Symfony\Cmf\Component\Routing\Candidates\Candidates;
1515
use Symfony\Component\HttpFoundation\Request;

tests/Unit/DependencyInjection/Compiler/RegisterRouteEnhancersPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\DependencyInjection\Compiler;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\DependencyInjection\Compiler;
1313

1414
use Symfony\Cmf\Component\Routing\DependencyInjection\Compiler\RegisterRouteEnhancersPass;
1515
use Symfony\Component\DependencyInjection\Definition;

tests/Unit/DependencyInjection/Compiler/RegisterRoutersPassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Routing\Tests\DependencyInjection\Compiler;
12+
namespace Symfony\Cmf\Routing\Tests\Unit\DependencyInjection\Compiler;
1313

1414
use Symfony\Cmf\Component\Routing\DependencyInjection\Compiler\RegisterRoutersPass;
1515
use Symfony\Component\DependencyInjection\Reference;

tests/Unit/Enhancer/ConditionalEnhancerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Mapper;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Mapper;
1313

1414
use Symfony\Cmf\Component\Routing\Enhancer\ConditionalEnhancer;
1515
use Symfony\Component\HttpFoundation\Request;

tests/Unit/Enhancer/ContentRepositoryEnhancerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Enhancer;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Enhancer;
1313

1414
use Symfony\Cmf\Component\Routing\Enhancer\ContentRepositoryEnhancer;
1515
use Symfony\Cmf\Component\Routing\RouteObjectInterface;

tests/Unit/Enhancer/FieldByClassEnhancerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Enhancer;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Enhancer;
1313

1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Cmf\Component\Routing\Test\CmfUnitTestCase;

tests/Unit/Enhancer/FieldMapEnhancerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Mapper;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Mapper;
1313

1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Cmf\Component\Routing\Test\CmfUnitTestCase;

tests/Unit/Enhancer/FieldPresenceEnhancerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Component\Routing\Tests\Enhancer;
12+
namespace Symfony\Cmf\Component\Routing\Tests\Unit\Enhancer;
1313

1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Cmf\Component\Routing\Enhancer\FieldPresenceEnhancer;

0 commit comments

Comments
 (0)