You are here

private function DiactorosFactoryTest::createUploadedFile in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php \Symfony\Bridge\PsrHttpMessage\Tests\Factory\DiactorosFactoryTest::createUploadedFile()
1 call to DiactorosFactoryTest::createUploadedFile()
DiactorosFactoryTest::testCreateRequest in vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php

File

vendor/symfony/psr-http-message-bridge/Tests/Factory/DiactorosFactoryTest.php, line 114

Class

DiactorosFactoryTest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Factory

Code

private function createUploadedFile($content, $originalName, $mimeType, $error) {
  $path = tempnam($this->tmpDir, uniqid());
  file_put_contents($path, $content);
  return new UploadedFile($path, $originalName, $mimeType, filesize($path), $error, true);
}