$uploadedFiles =
$psrRequest->
getUploadedFiles();
$this->
assertSame('F1',
$uploadedFiles['f1'
]->
getStream()->
__toString());
$this->
assertSame('f1.txt',
$uploadedFiles['f1'
]->
getClientFilename());
$this->
assertSame('text/plain',
$uploadedFiles['f1'
]->
getClientMediaType());
$this->
assertSame(\UPLOAD_ERR_OK,
$uploadedFiles['f1'
]->
getError());
$this->
assertSame('F2',
$uploadedFiles['foo'
]['f2'
]->
getStream()->
__toString());
$this->
assertSame('f2.txt',
$uploadedFiles['foo'
]['f2'
]->
getClientFilename());
$this->
assertSame('text/plain',
$uploadedFiles['foo'
]['f2'
]->
getClientMediaType());
$this->
assertSame(\UPLOAD_ERR_OK,
$uploadedFiles['foo'
]['f2'
]->
getError());
$serverParams =
$psrRequest->
getServerParams();
$this->
assertSame('POST',
$serverParams['REQUEST_METHOD'
]);
$this->
assertSame('2.8',
$serverParams['HTTP_X_SYMFONY'
]);
$this->
assertSame('POST',
$psrRequest->
getMethod());
$this->
assertSame(['2.8'
],
$psrRequest->
getHeader('X-Symfony'
));
} public function testGetContentCanBeCalledAfterRequestCreation() { $header =
['HTTP_HOST' => 'dunglas.fr'
];
$request =
new Request([],
[],
[],
[],
[],
$header, 'Content'
);