public function DiactorosFactoryTest::testCreateResponseFromBinaryFile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php \Symfony\Bridge\PsrHttpMessage\Tests\Factory\DiactorosFactoryTest::testCreateResponseFromBinaryFile()
File
- vendor/
symfony/ psr-http-message-bridge/ Tests/ Factory/ DiactorosFactoryTest.php, line 153
Class
- DiactorosFactoryTest
- @author Kévin Dunglas <dunglas@gmail.com>
Namespace
Symfony\Bridge\PsrHttpMessage\Tests\FactoryCode
public function testCreateResponseFromBinaryFile() {
$path = tempnam($this->tmpDir, uniqid());
file_put_contents($path, 'Binary');
$response = new BinaryFileResponse($path);
$psrResponse = $this->factory
->createResponse($response);
$this
->assertEquals('Binary', $psrResponse
->getBody()
->__toString());
}