2 declare(strict_types = 1);
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 $_SERVER[
'HTTP_HOST'] =
'localhost';
33 $_SERVER[
'REQUEST_URI'] =
'/index.php';
34 $_SERVER[
'REMOTE_ADDR'] =
'';
35 $_SERVER[
'SSL_SESSION_ID'] =
'';
37 'tx_uploadexample_piexample' => [
40 'image' =>
'o51pb.jpg',
41 'imageCollection' => [
48 'image' =>
'image/jpeg',
49 'imageCollection' => [
50 0 =>
'application/json'
56 'image' =>
'/Applications/MAMP/tmp/php/phphXdbcd',
57 'imageCollection' => [
58 0 =>
'/Applications/MAMP/tmp/php/phpgrZ4bb'
65 'imageCollection' => [
73 'imageCollection' => [
83 $this->assertNotEmpty($uploadedFiles[
'tx_uploadexample_piexample'][
'newExample'][
'image']);
84 $this->assertTrue($uploadedFiles[
'tx_uploadexample_piexample'][
'newExample'][
'image'] instanceof
UploadedFile);
85 $this->assertNotEmpty($uploadedFiles[
'tx_uploadexample_piexample'][
'newExample'][
'imageCollection'][0]);
86 $this->assertTrue($uploadedFiles[
'tx_uploadexample_piexample'][
'newExample'][
'imageCollection'][0] instanceof
UploadedFile);
94 $_SERVER[
'HTTP_HOST'] =
'localhost';
95 $_SERVER[
'REQUEST_URI'] =
'/index.php';
96 $_SERVER[
'REMOTE_ADDR'] =
'';
97 $_SERVER[
'SSL_SESSION_ID'] =
'';
102 $this->assertEmpty($uploadedFiles);
110 $_SERVER[
'HTTP_HOST'] =
'localhost';
111 $_SERVER[
'REQUEST_URI'] =
'/index.php';
112 $_SERVER[
'REMOTE_ADDR'] =
'';
113 $_SERVER[
'SSL_SESSION_ID'] =
'';
115 'tx_uploadexample_piexample' => [
125 $this->assertEmpty($uploadedFiles);