|
@@ 98-108 (lines=11) @@
|
| 95 |
|
$this->assertEquals($json->moreRefinements, $navigation->getMoreRefinements()); |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
public function testDeserializeClusterRecord() |
| 99 |
|
{ |
| 100 |
|
/** @var ClusterRecord $clusterRecord */ |
| 101 |
|
$clusterRecord = $this->deserialize(Json::$CLUSTER_RECORD, 'GroupByInc\API\Model\ClusterRecord'); |
| 102 |
|
$this->assertEquals(Object::$CLUSTER_RECORD, $clusterRecord); |
| 103 |
|
|
| 104 |
|
$json = json_decode(Json::$CLUSTER_RECORD); |
| 105 |
|
$this->assertEquals($json->snippet, $clusterRecord->getSnippet()); |
| 106 |
|
$this->assertEquals($json->title, $clusterRecord->getTitle()); |
| 107 |
|
$this->assertEquals($json->url, $clusterRecord->getUrl()); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public function testDeserializeCluster() |
| 111 |
|
{ |
|
@@ 169-179 (lines=11) @@
|
| 166 |
|
$this->assertEquals($json->recordEnd, $pageInfo->getRecordEnd()); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
public function testDeserializeContentZone() |
| 170 |
|
{ |
| 171 |
|
/** @var ContentZone $contentZone */ |
| 172 |
|
$contentZone = $this->deserialize(Json::$CONTENT_ZONE, 'GroupByInc\API\Model\ContentZone'); |
| 173 |
|
$this->assertEquals(Object::$CONTENT_ZONE, $contentZone); |
| 174 |
|
|
| 175 |
|
$json = json_decode(Json::$CONTENT_ZONE); |
| 176 |
|
$this->assertEquals($json->name, $contentZone->getName()); |
| 177 |
|
$this->assertEquals($json->content, $contentZone->getContent()); |
| 178 |
|
$this->assertEquals($json->type, $contentZone->getType()); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
public function testDeserializeRecordZone() |
| 182 |
|
{ |
|
@@ 194-204 (lines=11) @@
|
| 191 |
|
$this->assertEquals($json->type, $recordZone->getType()); |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
public function testDeserializeBannerZone() |
| 195 |
|
{ |
| 196 |
|
/** @var BannerZone $bannerZone */ |
| 197 |
|
$bannerZone = $this->deserialize(Json::$BANNER_ZONE, 'GroupByInc\API\Model\BannerZone'); |
| 198 |
|
$this->assertEquals(Object::$BANNER_ZONE, $bannerZone); |
| 199 |
|
|
| 200 |
|
$json = json_decode(Json::$BANNER_ZONE); |
| 201 |
|
$this->assertEquals($json->name, $bannerZone->getName()); |
| 202 |
|
$this->assertEquals($json->bannerUrl, $bannerZone->getBannerUrl()); |
| 203 |
|
$this->assertEquals($json->type, $bannerZone->getType()); |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
public function testDeserializeRichContentZone() |
| 207 |
|
{ |
|
@@ 206-216 (lines=11) @@
|
| 203 |
|
$this->assertEquals($json->type, $bannerZone->getType()); |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
public function testDeserializeRichContentZone() |
| 207 |
|
{ |
| 208 |
|
/** @var RichContentZone $richContentZone */ |
| 209 |
|
$richContentZone = $this->deserialize(Json::$RICH_CONTENT_ZONE, 'GroupByInc\API\Model\RichContentZone'); |
| 210 |
|
$this->assertEquals(Object::$RICH_CONTENT_ZONE, $richContentZone); |
| 211 |
|
|
| 212 |
|
$json = json_decode(Json::$RICH_CONTENT_ZONE); |
| 213 |
|
$this->assertEquals($json->name, $richContentZone->getName()); |
| 214 |
|
$this->assertEquals($json->richContent, $richContentZone->getRichContent()); |
| 215 |
|
$this->assertEquals($json->type, $richContentZone->getType()); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
public function testDeserializeTemplate() |
| 219 |
|
{ |