Commit 2adf8223 authored by catch's avatar catch
Browse files

Issue #3238210 by daffie: The mocked method in...

Issue #3238210 by daffie: The mocked method in Drupal\Tests\Core\Routing\LazyRouteCollectionTest does not return an ArrayIiterator
parent 3c4ef6b6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@ class LazyRouteCollectionTest extends UnitTestCase {
  public function setUp(): void {
    parent::setUp();
    $this->routeProvider = $this->createMock(RouteProviderInterface::class);
    $this->testRoutes = [
    $this->testRoutes = new \ArrayIterator([
      '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, iterator_to_array($lazyRouteCollection->getIterator()));
    $this->assertEquals($this->testRoutes, $lazyRouteCollection->getIterator());
    $this->assertEquals($this->testRoutes, $lazyRouteCollection->all());
  }