You are here

public function RedirectResponseTest::testGenerateMetaRedirect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RedirectResponseTest.php \Symfony\Component\HttpFoundation\Tests\RedirectResponseTest::testGenerateMetaRedirect()

File

vendor/symfony/http-foundation/Tests/RedirectResponseTest.php, line 18

Class

RedirectResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGenerateMetaRedirect() {
  $response = new RedirectResponse('foo.bar');
  $this
    ->assertEquals(1, preg_match('#<meta http-equiv="refresh" content="\\d+;url=foo\\.bar" />#', preg_replace(array(
    '/\\s+/',
    '/\'/',
  ), array(
    ' ',
    '"',
  ), $response
    ->getContent())));
}