Skip to content

Commit fd74ae2

Browse files
committed
Test additional properties for sites
1 parent 9d36db6 commit fd74ae2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Api/Struct/Site/GeneralInfo.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class GeneralInfo extends \PleskX\Api\Struct
77
{
88
/** @var string */
9-
public $crDate;
9+
public $creationDate;
1010

1111
/** @var string */
1212
public $name;
@@ -38,7 +38,7 @@ class GeneralInfo extends \PleskX\Api\Struct
3838
public function __construct($apiResponse)
3939
{
4040
$this->_initScalarProperties($apiResponse, [
41-
'cr_date',
41+
['cr_date' => 'creationDate'],
4242
'name',
4343
'ascii-name',
4444
'status',

tests/SiteTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function testGet()
6161

6262
$siteInfo = static::$_client->site()->get('id', $site->id);
6363
$this->assertEquals('addon.dom', $siteInfo->name);
64+
$this->assertMatchesRegularExpression("/^\d{4}-\d{2}-\d{2}$/", $siteInfo->creationDate);
65+
$this->assertEquals(36, strlen($siteInfo->guid));
6466

6567
static::$_client->site()->delete('id', $site->id);
6668
}

0 commit comments

Comments
 (0)