Verified Commit c6aa9bc1 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3158708 by catch: RouteProvider::getAllRoutes no longer returns an iterable, breaking BC

parent 5920411f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -408,7 +408,8 @@ public function getAllRoutes() {
      $result[$name] = unserialize($route);
    }

    return $result;
    $array_object = new \ArrayObject($result);
    return $array_object->getIterator();
  }

  /**
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ public function testGetAllRoutes() {

    $returned_routes = $provider->getAllRoutes();

    $this->assertInstanceOf(\Iterator::class, $returned_routes);
    $this->assertEqual($expected_route_count, count($returned_routes));

    foreach ($returned_routes as $route_name => $route) {