Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
minor #181 Fixes #179 (jeremeamia)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.0-dev branch.

Discussion
----------

Fixes #179

Fixes #179 so that the tests comparing "Content-Disposition" header values work with all versions of Guzzle.

Commits
-------

7c37f0f Fixes #179 so that tests comparing Content-Disposition headers work with all versions of Guzzle
  • Loading branch information
fabpot committed Oct 3, 2014
2 parents b12c3f7 + 7c37f0f commit 41f26f1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Goutte/Tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,16 @@ protected function assertFile(PostFile $postFile, $fieldName, $fileName, $header
{
$this->assertEquals($postFile->getName(), $fieldName);
$this->assertEquals($postFile->getFilename(), $fileName);
$this->assertEquals($postFile->getHeaders(), $headers);

$postFileHeaders = $postFile->getHeaders();

// Note: Sort 'Content-Disposition' values before comparing, because the order changed in Guzzle 4.2.2
$postFileHeaders['Content-Disposition'] = explode('; ', $postFileHeaders['Content-Disposition']);
sort($postFileHeaders['Content-Disposition']);
$headers['Content-Disposition'] = explode('; ', $headers['Content-Disposition']);
sort($headers['Content-Disposition']);

$this->assertEquals($postFileHeaders, $headers);
}

public function testHttps()
Expand Down

0 comments on commit 41f26f1

Please sign in to comment.