@@ -31,7 +31,7 @@ abstract class AbstractHttpMessageFactoryTest extends TestCase
3131
3232 abstract protected function buildHttpMessageFactory (): HttpMessageFactoryInterface ;
3333
34- public function setUp (): void
34+ protected function setUp (): void
3535 {
3636 $ this ->factory = $ this ->buildHttpMessageFactory ();
3737 $ this ->tmpDir = sys_get_temp_dir ();
@@ -61,8 +61,8 @@ public function testCreateRequest()
6161 'c2 ' => ['c3 ' => 'bar ' ],
6262 ],
6363 [
64- 'f1 ' => $ this ->createUploadedFile ('F1 ' , 'f1.txt ' , 'text/plain ' , UPLOAD_ERR_OK ),
65- 'foo ' => ['f2 ' => $ this ->createUploadedFile ('F2 ' , 'f2.txt ' , 'text/plain ' , UPLOAD_ERR_OK )],
64+ 'f1 ' => $ this ->createUploadedFile ('F1 ' , 'f1.txt ' , 'text/plain ' , \ UPLOAD_ERR_OK ),
65+ 'foo ' => ['f2 ' => $ this ->createUploadedFile ('F2 ' , 'f2.txt ' , 'text/plain ' , \ UPLOAD_ERR_OK )],
6666 ],
6767 [
6868 'REQUEST_METHOD ' => 'POST ' ,
@@ -102,12 +102,12 @@ public function testCreateRequest()
102102 $ this ->assertEquals ('F1 ' , $ uploadedFiles ['f1 ' ]->getStream ()->__toString ());
103103 $ this ->assertEquals ('f1.txt ' , $ uploadedFiles ['f1 ' ]->getClientFilename ());
104104 $ this ->assertEquals ('text/plain ' , $ uploadedFiles ['f1 ' ]->getClientMediaType ());
105- $ this ->assertEquals (UPLOAD_ERR_OK , $ uploadedFiles ['f1 ' ]->getError ());
105+ $ this ->assertEquals (\ UPLOAD_ERR_OK , $ uploadedFiles ['f1 ' ]->getError ());
106106
107107 $ this ->assertEquals ('F2 ' , $ uploadedFiles ['foo ' ]['f2 ' ]->getStream ()->__toString ());
108108 $ this ->assertEquals ('f2.txt ' , $ uploadedFiles ['foo ' ]['f2 ' ]->getClientFilename ());
109109 $ this ->assertEquals ('text/plain ' , $ uploadedFiles ['foo ' ]['f2 ' ]->getClientMediaType ());
110- $ this ->assertEquals (UPLOAD_ERR_OK , $ uploadedFiles ['foo ' ]['f2 ' ]->getError ());
110+ $ this ->assertEquals (\ UPLOAD_ERR_OK , $ uploadedFiles ['foo ' ]['f2 ' ]->getError ());
111111
112112 $ serverParams = $ psrRequest ->getServerParams ();
113113 $ this ->assertEquals ('POST ' , $ serverParams ['REQUEST_METHOD ' ]);
@@ -201,10 +201,10 @@ public function testCreateResponseFromBinaryFileWithRange()
201201
202202 public function testUploadErrNoFile ()
203203 {
204- $ file = new UploadedFile ('' , '' , null , UPLOAD_ERR_NO_FILE , true );
204+ $ file = new UploadedFile ('' , '' , null , \ UPLOAD_ERR_NO_FILE , true );
205205
206206 $ this ->assertEquals (0 , $ file ->getSize ());
207- $ this ->assertEquals (UPLOAD_ERR_NO_FILE , $ file ->getError ());
207+ $ this ->assertEquals (\ UPLOAD_ERR_NO_FILE , $ file ->getError ());
208208 $ this ->assertFalse ($ file ->getSize (), 'SplFile::getSize() returns false on error ' );
209209
210210 $ request = new Request (
@@ -214,7 +214,7 @@ public function testUploadErrNoFile()
214214 [],
215215 [
216216 'f1 ' => $ file ,
217- 'f2 ' => ['name ' => null , 'type ' => null , 'tmp_name ' => null , 'error ' => UPLOAD_ERR_NO_FILE , 'size ' => 0 ],
217+ 'f2 ' => ['name ' => null , 'type ' => null , 'tmp_name ' => null , 'error ' => \ UPLOAD_ERR_NO_FILE , 'size ' => 0 ],
218218 ],
219219 [
220220 'REQUEST_METHOD ' => 'POST ' ,
@@ -228,7 +228,7 @@ public function testUploadErrNoFile()
228228
229229 $ uploadedFiles = $ psrRequest ->getUploadedFiles ();
230230
231- $ this ->assertEquals (UPLOAD_ERR_NO_FILE , $ uploadedFiles ['f1 ' ]->getError ());
232- $ this ->assertEquals (UPLOAD_ERR_NO_FILE , $ uploadedFiles ['f2 ' ]->getError ());
231+ $ this ->assertEquals (\ UPLOAD_ERR_NO_FILE , $ uploadedFiles ['f1 ' ]->getError ());
232+ $ this ->assertEquals (\ UPLOAD_ERR_NO_FILE , $ uploadedFiles ['f2 ' ]->getError ());
233233 }
234234}
0 commit comments