This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Tested default argument separator - Tested that argument separator may be provided - Provided functional test indicating provided argument separator is used
- Loading branch information
1 parent
f7b29f8
commit 7b3da41
Showing
3 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,20 +113,28 @@ protected function tearDown() | |
* Simple request tests | ||
*/ | ||
|
||
public function methodProvider() | ||
{ | ||
return array( | ||
array(Request::METHOD_GET), | ||
array(Request::METHOD_POST), | ||
array(Request::METHOD_OPTIONS), | ||
array(Request::METHOD_PUT), | ||
array(Request::METHOD_DELETE), | ||
array(Request::METHOD_PATCH), | ||
); | ||
} | ||
|
||
/** | ||
* Test simple requests | ||
* | ||
* @dataProvider methodProvider | ||
*/ | ||
public function testSimpleRequests() | ||
public function testSimpleRequests($method) | ||
{ | ||
$methods= array(Request::METHOD_GET, Request::METHOD_POST, Request::METHOD_OPTIONS, | ||
Request::METHOD_PUT, Request::METHOD_DELETE, Request::METHOD_PATCH); | ||
|
||
foreach ($methods as $method) { | ||
$this->client->setMethod($method); | ||
$res = $this->client->send(); | ||
$this->assertTrue($res->isSuccess(), "HTTP {$method} request failed."); | ||
} | ||
$this->client->setMethod($method); | ||
$res = $this->client->send(); | ||
$this->assertTrue($res->isSuccess(), "HTTP {$method} request failed."); | ||
} | ||
|
||
/** | ||
|
@@ -977,6 +985,21 @@ public function testContentTypeAdditionlInfo($params) | |
$request->getHeaders()->get('Content-Type')->getFieldValue()); | ||
} | ||
|
||
/** | ||
* @group 2774 | ||
* @group 2745 | ||
*/ | ||
public function testUsesProvidedArgSeparator() | ||
{ | ||
$this->client->setArgSeparator(';'); | ||
$request = new Request(); | ||
$request->setUri('http://framework.zend.com'); | ||
$request->setQuery(array('foo' => 'bar', 'baz' => 'bat')); | ||
$this->client->send($request); | ||
$rawRequest = $this->client->getLastRawRequest(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
weierophinney
via email
Author
Member
|
||
$this->assertContains('?foo=bar;baz=bat', $rawRequest); | ||
} | ||
|
||
/** | ||
* Internal helpder function to get the contents of test files | ||
* | ||
|
@@ -1045,5 +1068,4 @@ public static function invalidConfigProvider() | |
array(55) | ||
); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is this Order of Arguments Really guaranteed? Iirc Arrays are ordernd Maps in php and so its possible that the Array Keys are Provided in alphabetic instead of initialization Order.