Source

						public function testNestedDeepFilesNormalization() {
		$_FILES = array('Photo' => array(
			'name' => array(
		  		'files' => array(
					0 => 'file 6.jpg',
					1 => 'file 7.jpg',
					2 => 'file 8.jpg'
		  		)
			),
			'type' => array(
		  		'files' => array(
					0 => 'image/jpeg',
					1 => 'image/jpeg',
					2 => 'image/jpeg'
		  		)
			),
			'tmp_name' => array(
		  		'files' => array(
					0 => '/private/var/tmp/php2eViak',
					1 => '/private/var/tmp/phpMsC5Pp',
					2 => '/private/var/tmp/phpm2nm98'
		  		)
			),
			'error' => array(
				'files' => array(
					0 => 0,
					1 => 0,
					2 => 0
		  		)
			),
			'size' => array(
		  		'files' => array(
					0 => 418,
					1 => 418,
					2 => 418
		  		)
			)
		));
		$request = new Request();

		$expected = array('Photo' => array(
			'files' => array(
				0 => array(
					'name' => 'file 6.jpg',
					'type' => 'image/jpeg',
					'tmp_name' => '/private/var/tmp/php2eViak',
					'error' => 0,
					'size' => 418
				),
				1 => array(
					'name' => 'file 7.jpg',
					'type' => 'image/jpeg',
					'tmp_name' => '/private/var/tmp/phpMsC5Pp',
					'error' => 0,
					'size' => 418
				),
				2 => array(
					'name' => 'file 8.jpg',
					'type' => 'image/jpeg',
					'tmp_name' => '/private/var/tmp/phpm2nm98',
					'error' => 0,
					'size' => 418
				)
		  	)
		));
		$result = $request->data;
		$this->assertEqual($expected, $result);

		unset($_FILES, $request);
	}