Commit ca3ce56a authored by catch's avatar catch
Browse files

Issue #3259675 by hmendes, longwave: [Symfony 6]...

Issue #3259675 by hmendes, longwave: [Symfony 6] Drupal\Core\Routing\LazyRouteCollection::all(): Return value must be of type array, ArrayIterator returned
parent d0f71781
Loading
Loading
Loading
Loading
+3 −3
Changes for core/tests/Drupal/Tests/Core/Routing/LazyRouteCollectionTest.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@ class LazyRouteCollectionTest extends UnitTestCase {
  protected function setUp(): void {
    parent::setUp();
    $this->routeProvider = $this->createMock(RouteProviderInterface::class);
    $this->testRoutes = new \ArrayIterator([
    $this->testRoutes = [
      'route_1' => new Route('/route-1'),
      'route_2' => new Route('/route-2'),
    ]);
    ];
  }

  /**
@@ -51,7 +51,7 @@ public function testGetIterator() {
      ->with(NULL)
      ->will($this->returnValue($this->testRoutes));
    $lazyRouteCollection = new LazyRouteCollection($this->routeProvider);
    $this->assertEquals($this->testRoutes, $lazyRouteCollection->getIterator());
    $this->assertEquals($this->testRoutes, (array) $lazyRouteCollection->getIterator());
    $this->assertEquals($this->testRoutes, $lazyRouteCollection->all());
  }