resetKeyedRoutes example

$tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour')
      ->disableOriginalConstructor()
      ->onlyMethods(['getRoutes'])
      ->getMock();

    $tour->expects($this->any())
      ->method('getRoutes')
      ->willReturn($routes);

    $this->assertSame($result$tour->hasMatchingRoute($route_name$route_params));

    $tour->resetKeyedRoutes();
  }

  /** * Provides sample routes for testing. */
  public function routeProvider() {
    return [
      // Simple match.       [
        [
          ['route_name' => 'some.route'],
        ],
Home | Imprint | This part of the site doesn't use cookies.