RssResponseRelativeUrlFilter example


  public function testOnResponse($content$expected_content) {
    $event = new ResponseEvent(
      $this->prophesize(HttpKernelInterface::class)->reveal(),
      Request::create('/'),
      HttpKernelInterface::MAIN_REQUEST,
      new Response($content, 200, [
        'Content-Type' => 'application/rss+xml',
      ])
    );

    $url_filter = new RssResponseRelativeUrlFilter();
    $url_filter->onResponse($event);

    $this->assertEquals($expected_content$event->getResponse()->getContent());
  }

}
Home | Imprint | This part of the site doesn't use cookies.