1515use Symfony \Component \HttpFoundation \File \Exception \CannotWriteFileException ;
1616use Symfony \Component \HttpFoundation \File \Exception \ExtensionFileException ;
1717use Symfony \Component \HttpFoundation \File \Exception \FileException ;
18+ use Symfony \Component \HttpFoundation \File \Exception \FileNotFoundException ;
1819use Symfony \Component \HttpFoundation \File \Exception \FormSizeFileException ;
1920use Symfony \Component \HttpFoundation \File \Exception \IniSizeFileException ;
2021use Symfony \Component \HttpFoundation \File \Exception \NoFileException ;
@@ -33,7 +34,7 @@ protected function setUp(): void
3334
3435 public function testConstructWhenFileNotExists ()
3536 {
36- $ this ->expectException (\ Symfony \ Component \ HttpFoundation \ File \ Exception \ FileNotFoundException::class);
37+ $ this ->expectException (FileNotFoundException::class);
3738
3839 new UploadedFile (
3940 __DIR__ .'/Fixtures/not_here ' ,
@@ -358,13 +359,16 @@ public function testGetMaxFilesize()
358359 {
359360 $ size = UploadedFile::getMaxFilesize ();
360361
361- $ this ->assertIsInt ($ size );
362+ if ($ size > \PHP_INT_MAX ) {
363+ $ this ->assertIsFloat ($ size );
364+ } else {
365+ $ this ->assertIsInt ($ size );
366+ }
367+
362368 $ this ->assertGreaterThan (0 , $ size );
363369
364370 if (0 === (int ) ini_get ('post_max_size ' ) && 0 === (int ) ini_get ('upload_max_filesize ' )) {
365371 $ this ->assertSame (\PHP_INT_MAX , $ size );
366- } else {
367- $ this ->assertLessThan (\PHP_INT_MAX , $ size );
368372 }
369373 }
370374}
0 commit comments