PhlyTest\Http\ServerRequestFactoryTest::testMarshalsExpectedHeadersFromServerArray PHP Метод

testMarshalsExpectedHeadersFromServerArray() публичный Метод

    public function testMarshalsExpectedHeadersFromServerArray()
    {
        $server = ['HTTP_COOKIE' => 'COOKIE', 'HTTP_AUTHORIZATION' => 'token', 'HTTP_CONTENT_TYPE' => 'application/json', 'HTTP_ACCEPT' => 'application/json', 'HTTP_X_FOO_BAR' => 'FOOBAR', 'CONTENT_MD5' => 'CONTENT-MD5', 'CONTENT_LENGTH' => 'UNSPECIFIED'];
        $expected = ['authorization' => 'token', 'content-type' => 'application/json', 'accept' => 'application/json', 'x-foo-bar' => 'FOOBAR', 'content-md5' => 'CONTENT-MD5', 'content-length' => 'UNSPECIFIED'];
        $this->assertEquals($expected, ServerRequestFactory::marshalHeaders($server));
    }
ServerRequestFactoryTest