Skip to content

Commit

Permalink
Serialize scalars and objects in original format. (#13986)
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Jan 22, 2019
1 parent 7a95eba commit 00b8156
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/API/Renderer/Original.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public function renderArray($array)

public function renderScalar($scalar)
{
return $scalar;
return $this->serializeIfNeeded($scalar);
}

public function renderObject($object)
{
return $object;
return $this->serializeIfNeeded($object);
}

public function renderResource($resource)
Expand Down
8 changes: 8 additions & 0 deletions tests/PHPUnit/System/OneVisitorTwoVisitsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ public function getApiForTesting()
),
'onlyCheckUnserialize' => true,
)),
array('Live.getMostRecentVisitorId', array('idSite' => $idSite,
'date' => $dateTime,
'format' => 'original',
'otherRequestParameters' => array(
'serialize' => '1',
),
'onlyCheckUnserialize' => true,
)),

// test API.get (for bug that incorrectly reorders columns of CSV output)
// note: bug only affects rows after first
Expand Down

0 comments on commit 00b8156

Please sign in to comment.