Skip to content

Commit 9908ec4

Browse files
committed
Expose information about disk space usage for webspace.
1 parent edf903f commit 9908ec4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Api/Struct/Webspace/GeneralInfo.php

+4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ class GeneralInfo extends \PleskX\Api\Struct
1111
/** @var string */
1212
public $guid;
1313

14+
/** @var integer */
15+
public $realSize;
16+
1417
public function __construct($apiResponse)
1518
{
1619
$this->_initScalarProperties($apiResponse, [
1720
'name',
1821
'guid',
22+
'real_size',
1923
]);
2024
}
2125
}

tests/WebspaceTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public function testGet()
142142
$webspace = static::_createWebspace();
143143
$webspaceInfo = static::$_client->webspace()->get('id', $webspace->id);
144144

145-
$this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo);
145+
$this->assertNotEmpty($webspaceInfo->name);
146+
$this->assertEquals(0, $webspaceInfo->realSize);
147+
146148
}
147149
}

0 commit comments

Comments
 (0)