Neos\Flow\Tests\Unit\Http\HeadersTest::headerFieldsCanBeSpecifiedToTheConstructor PHP Method

headerFieldsCanBeSpecifiedToTheConstructor() public method

    public function headerFieldsCanBeSpecifiedToTheConstructor()
    {
        $headers = new Headers(['User-Agent' => 'Espresso Machine', 'Server' => ['Foo', 'Bar']]);
        $this->assertSame('Espresso Machine', $headers->get('User-Agent'));
        $this->assertSame(['Foo', 'Bar'], $headers->get('Server'));
        $this->assertTrue($headers->has('Server'));
    }