| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -174,7 +174,7 @@ public function has($key) | |||
| 174 | 174 | */ | |
| 175 | 175 | public function all() | |
| 176 | 176 | { | |
| 177 | - return $this->input() + $this->files->all(); | ||
| 177 | + return array_merge_recursive($this->input(), $this->files->all()); | ||
| 178 | 178 | } | |
| 179 | 179 | ||
| 180 | 180 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -238,6 +238,14 @@ public function testAllInputReturnsInputAndFiles() | |||
| 238 | 238 | } | |
| 239 | 239 | ||
| 240 | 240 | ||
| 241 | + public function testAllInputReturnsNestedInputAndFiles() | ||
| 242 | + { | ||
| 243 | + $file = $this->getMock('Symfony\Component\HttpFoundation\File\UploadedFile', null, array(__FILE__, 'photo.jpg')); | ||
| 244 | + $request = Request::create('/?boom=breeze', 'GET', array('foo' => array('bar' => 'baz')), array(), array('foo' => array('photo' => $file))); | ||
| 245 | + $this->assertEquals(array('foo' => array('bar' => 'baz', 'photo' => $file), 'boom' => 'breeze'), $request->all()); | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + | ||
| 241 | 249 | public function testOldMethodCallsSession() | |
| 242 | 250 | { | |
| 243 | 251 | $request = Request::create('/', 'GET'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments