-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from abashurov/master
TECH Add a test for extended field values
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,57 @@ public function testCreate() | |
static::$client->mail()->delete('name', $mailname->name, static::$webspace->id); | ||
} | ||
|
||
public function testCreateMultiForwarding() | ||
{ | ||
$mailname = static::$client->request([ | ||
'mail' => [ | ||
'create' => [ | ||
'filter' => [ | ||
'site-id' => static::$webspace->id, | ||
'mailname' => [ | ||
'name' => 'test', | ||
'mailbox' => [ | ||
'enabled' => true, | ||
], | ||
'forwarding' => [ | ||
'enabled' => true, | ||
'address' => [ | ||
'[email protected]', | ||
'[email protected]', | ||
], | ||
], | ||
'alias' => [ | ||
'test1', | ||
'test2', | ||
], | ||
'password' => [ | ||
'value' => PasswordProvider::STRONG_PASSWORD, | ||
], | ||
], | ||
], | ||
], | ||
], | ||
]); | ||
|
||
$mailnameInfo = static::$client->request([ | ||
'mail' => [ | ||
'get_info' => [ | ||
'filter' => [ | ||
'site-id' => static::$webspace->id, | ||
'name' => 'test', | ||
], | ||
'forwarding' => null, | ||
'aliases' => null, | ||
], | ||
], | ||
]); | ||
|
||
$this->assertSame(2, count($mailnameInfo->mailname->forwarding->address)); | ||
$this->assertSame(2, count($mailnameInfo->mailname->alias)); | ||
|
||
static::$client->mail()->delete('name', 'test', static::$webspace->id); | ||
} | ||
|
||
public function testDelete() | ||
{ | ||
$mailname = static::$client->mail()->create('test', static::$webspace->id); | ||
|