Skip to content

Instantly share code, notes, and snippets.

@neclimdul
Created October 7, 2015 22:59

Revisions

  1. neclimdul created this gist Oct 7, 2015.
    12 changes: 12 additions & 0 deletions SecuredRedirectResponseTest.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    <?php
    class SecuredRedirectResponseTest extends UnitTestCase {

    public function testHeaderBag() {

    $headers = ['test'];
    $bag1 = new ResponseHeaderBag($headers);
    $bag2 = new ResponseHeaderBag($bag1->allPreserveCase());
    $this->assertEquals($bag1->allPreserveCase(), $bag2->allPreserveCase());
    }

    }
    12 changes: 12 additions & 0 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    1) Drupal\Tests\Core\Routing\SecuredRedirectResponseTest::testHeaderBag
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
    0 => Array (...)
    'Cache-Control' => Array (
    - 0 => 'no-cache'
    + 0 => 'no-cache, private'
    )
    )