public function HttpFoundationFactoryTest::testCreateUploadedFileWithError in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php \Symfony\Bridge\PsrHttpMessage\Tests\Factory\HttpFoundationFactoryTest::testCreateUploadedFileWithError()
@expectedException \Symfony\Component\HttpFoundation\File\Exception\FileException @expectedExceptionMessage The file "e" could not be written on disk.
File
- vendor/
symfony/ psr-http-message-bridge/ Tests/ Factory/ HttpFoundationFactoryTest.php, line 139
Class
- HttpFoundationFactoryTest
- @author Kévin Dunglas <dunglas@gmail.com>
Namespace
Symfony\Bridge\PsrHttpMessage\Tests\FactoryCode
public function testCreateUploadedFileWithError() {
$uploadedFile = $this
->createUploadedFile('Error.', UPLOAD_ERR_CANT_WRITE, 'e', 'text/plain');
$symfonyUploadedFile = $this
->callCreateUploadedFile($uploadedFile);
$this
->assertEquals(UPLOAD_ERR_CANT_WRITE, $symfonyUploadedFile
->getError());
$symfonyUploadedFile
->move($this->tmpDir, 'shouldFail.txt');
}