@@ -97,15 +97,16 @@ public function testFilterResponseSupportsStreamedResponses()
97
97
public function testUploadedFile ()
98
98
{
99
99
$ source = tempnam (sys_get_temp_dir (), 'source ' );
100
+ file_put_contents ($ source , '1 ' );
100
101
$ target = sys_get_temp_dir ().'/sf.moved.file ' ;
101
102
@unlink ($ target );
102
103
103
104
$ kernel = new TestHttpKernel ();
104
105
$ client = new Client ($ kernel );
105
106
106
107
$ files = array (
107
- array ('tmp_name ' => $ source , 'name ' => 'original ' , 'type ' => 'mime/original ' , 'size ' => 123 , 'error ' => UPLOAD_ERR_OK ),
108
- new UploadedFile ($ source , 'original ' , 'mime/original ' , 123 , UPLOAD_ERR_OK , true ),
108
+ array ('tmp_name ' => $ source , 'name ' => 'original ' , 'type ' => 'mime/original ' , 'size ' => 1 , 'error ' => UPLOAD_ERR_OK ),
109
+ new UploadedFile ($ source , 'original ' , 'mime/original ' , 1 , UPLOAD_ERR_OK , true ),
109
110
);
110
111
111
112
$ file = null ;
@@ -120,7 +121,7 @@ public function testUploadedFile()
120
121
121
122
$ this ->assertEquals ('original ' , $ file ->getClientOriginalName ());
122
123
$ this ->assertEquals ('mime/original ' , $ file ->getClientMimeType ());
123
- $ this ->assertEquals ( ' 123 ' , $ file ->getClientSize ());
124
+ $ this ->assertSame ( 1 , $ file ->getClientSize ());
124
125
$ this ->assertTrue ($ file ->isValid ());
125
126
}
126
127
0 commit comments