Skip to content

Commit 2b82c1b

Browse files
Rohit MishraRohit Mishra
authored andcommitted
updated in test file
1 parent b8f3897 commit 2b82c1b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/lib/utility.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ function wrapResult($result = '', $queryObject = '') {
256256
function contentstackRequest($queryObject = '', $type = ''){
257257
$server_output = '';
258258
if($queryObject) {
259+
// \Contentstack\Utility\debug(contentstackUrl($queryObject, $type));
259260
$http = curl_init(contentstackUrl($queryObject, $type));
260261

261262
// setting the GET request

test/AssetsTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ public function testAssetsFindLimit() {
7676
$this->assertTrue(checkAssetsSorting($_assets[0]));
7777
}
7878

79+
public function testAssetsAddParam() {
80+
$_assets = self::$Stack->Assets()->Query()->addParam('include_dimension', 'true')->toJSON()->find();
81+
$_object = self::$Stack->Assets()->Query()->toJSON()->find();
82+
$_uid = $_object[0][0]['uid'];
83+
$_asset = self::$Stack->Assets($_uid)->addParam('include_dimension', 'true')->toJSON()->fetch();
84+
$this->assertTrue(array_key_exists('dimension', $_asset));
85+
}
86+
87+
public function testAssetsmultipleAddParam() {
88+
$_assets = self::$Stack->Assets()->Query()->addParam('include_dimension', 'true')->toJSON()->find();
89+
$this->assertTrue(array_key_exists('dimension', $_assets[0][0]));
90+
91+
}
92+
93+
7994
public function testAssetsFindCount() {
8095
$_assets = self::$Stack->Assets()->Query()->toJSON()->count()->find();
8196
$assets = self::$Stack->Assets()->Query()->toJSON()->find();

0 commit comments

Comments
 (0)