Skip to content

Commit ac5cd86

Browse files
committed
minor #14 Remove use of deprecated 'deep' parameter in tests (KorvinSzanto)
This PR was merged into the master branch. Discussion ---------- Remove use of deprecated 'deep' parameter in tests This allows the tests to complete when using the symfony 3.0 version of http-foundation. Commits ------- 305c0fe Remove use of deprecated 'deep' parameter
2 parents 3664dc0 + 305c0fe commit ac5cd86

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Tests/Factory/HttpFoundationFactoryTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
*/
2424
class HttpFoundationFactoryTest extends \PHPUnit_Framework_TestCase
2525
{
26+
/** @var HttpFoundationFactory */
2627
private $factory;
28+
29+
/** @var string */
2730
private $tmpDir;
2831

2932
public function setup()
@@ -62,11 +65,12 @@ public function testCreateRequest()
6265
);
6366

6467
$symfonyRequest = $this->factory->createRequest($serverRequest);
68+
$files = $symfonyRequest->files->all();
6569

6670
$this->assertEquals('http://les-tilleuls.coop', $symfonyRequest->query->get('url'));
67-
$this->assertEquals('doc1.txt', $symfonyRequest->files->get('doc1')->getClientOriginalName());
68-
$this->assertEquals('doc2.txt', $symfonyRequest->files->get('nested[docs][0]', null, true)->getClientOriginalName());
69-
$this->assertEquals('doc3.txt', $symfonyRequest->files->get('nested[docs][1]', null, true)->getClientOriginalName());
71+
$this->assertEquals('doc1.txt', $files['doc1']->getClientOriginalName());
72+
$this->assertEquals('doc2.txt', $files['nested']['docs'][0]->getClientOriginalName());
73+
$this->assertEquals('doc3.txt', $files['nested']['docs'][1]->getClientOriginalName());
7074
$this->assertEquals('http://dunglas.fr', $symfonyRequest->request->get('url'));
7175
$this->assertEquals($stdClass, $symfonyRequest->attributes->get('custom'));
7276
$this->assertEquals('Lille', $symfonyRequest->cookies->get('city'));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy