Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2 into string
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 101 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

14 changes: 0 additions & 14 deletions .travis/run-tests.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .travis/skipped-components

This file was deleted.

61 changes: 0 additions & 61 deletions .travis/tested-components

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zendframework/zend-json",
"description": "Zend\\Json component",
"description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP",
"license": "BSD-3-Clause",
"keywords": [
"zf2",
Expand All @@ -9,11 +9,11 @@
"homepage": "https://github.com/zendframework/zend-json",
"autoload": {
"psr-4": {
"Zend\\Json\\": "src/"
"Zend\\Json": "src/"
}
},
"require": {
"php": ">=5.3.23",
"php": ">=5.3.3",
"zendframework/zend-stdlib": "self.version"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/Server/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ public function doRequest($request)
$this->lastRequest = $request;

$httpRequest = $this->httpClient->getRequest();
if ($httpRequest->getUri() === null) {
if ($httpRequest->getUriString() === null) {
$this->httpClient->setUri($this->serverAddress);
}

$headers = $httpRequest->headers();
$headers = $httpRequest->getHeaders();
$headers->addHeaders(array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
Expand Down
16 changes: 6 additions & 10 deletions test/JsonXmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,16 +558,12 @@ public function testNestingDepthIsHandledProperlyWhenNestingDepthExceedsMaximum(
* @dataProvider providerNestingDepthIsHandledProperly
*/
public function testNestingDepthIsHandledProperlyWhenNestingDepthDoesNotExceedMaximum($xmlStringContents)
{
try {
Json\Json::$maxRecursionDepthAllowed = 25;
$jsonString = Json\Json::fromXml($xmlStringContents, true);
$jsonArray = Json\Json::decode($jsonString, Json\Json::TYPE_ARRAY);
$this->assertNotNull($jsonArray, "JSON decode result is NULL");
$this->assertSame('A', $jsonArray['response']['message_type']['defaults']['close_rules']['after_responses']);
} catch ( Zend\Json\Exception\RecursionException $ex ) {
$this->fail('Zend_Json::fromXml does not implement recursion check properly');
}
{
Json\Json::$maxRecursionDepthAllowed = 25;
$jsonString = Json\Json::fromXml($xmlStringContents, true);
$jsonArray = Json\Json::decode($jsonString, Json\Json::TYPE_ARRAY);
$this->assertNotNull($jsonArray, "JSON decode result is NULL");
$this->assertSame('A', $jsonArray['response']['message_type']['defaults']['close_rules']['after_responses']);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/Server/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function testSettingNoHttpClientUriForcesClientToSetUri()
$this->jsonClient->setHttpClient($this->httpClient);

$this->setServerResponseTo(null);
$this->assertNull($this->jsonClient->getHttpClient()->getRequest()->getUri());
$this->assertNull($this->jsonClient->getHttpClient()->getRequest()->getUriString());
$this->jsonClient->call('foo');
$uri = $this->jsonClient->getHttpClient()->getUri();

Expand Down

0 comments on commit 0754658

Please sign in to comment.