contentRouteCollection example

$this->fixtures = new RoutingFixtures();
    $this->matcher = new ContentTypeHeaderMatcher();
  }

  /** * Tests that routes are not filtered on safe requests. * * @dataProvider providerTestSafeRequestFilter */
  public function testSafeRequestFilter($method) {
    $collection = $this->fixtures->sampleRouteCollection();
    $collection->addCollection($this->fixtures->contentRouteCollection());

    $request = Request::create('path/two', $method);
    $routes = $this->matcher->filter($collection$request);
    $this->assertCount(7, $routes, 'The correct number of routes was found.');
  }

  public function providerTestSafeRequestFilter() {
    return [
      ['GET'],
      ['HEAD'],
      ['OPTIONS'],
      [
Home | Imprint | This part of the site doesn't use cookies.