File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,57 @@ public function testCreate()
4747 static ::$ client ->mail ()->delete ('name ' , $ mailname ->name , static ::$ webspace ->id );
4848 }
4949
50+ public function testCreateMultiForwarding ()
51+ {
52+ $ mailname = static ::$ client ->request ([
53+ 'mail ' => [
54+ 'create ' => [
55+ 'filter ' => [
56+ 'site-id ' => static ::$ webspace ->id ,
57+ 'mailname ' => [
58+ 'name ' => 'test ' ,
59+ 'mailbox ' => [
60+ 'enabled ' => true ,
61+ ],
62+ 'forwarding ' => [
63+ 'enabled ' => true ,
64+ 'address ' => [
65+ 'user1@example.com ' ,
66+ 'user2@example.com ' ,
67+ ],
68+ ],
69+ 'alias ' => [
70+ 'test1 ' ,
71+ 'test2 ' ,
72+ ],
73+ 'password ' => [
74+ 'value ' => PasswordProvider::STRONG_PASSWORD ,
75+ ],
76+ ],
77+ ],
78+ ],
79+ ],
80+ ]);
81+
82+ $ mailnameInfo = static ::$ client ->request ([
83+ 'mail ' => [
84+ 'get_info ' => [
85+ 'filter ' => [
86+ 'site-id ' => static ::$ webspace ->id ,
87+ 'name ' => 'test ' ,
88+ ],
89+ 'forwarding ' => null ,
90+ 'aliases ' => null ,
91+ ],
92+ ],
93+ ]);
94+
95+ $ this ->assertSame (2 , count ($ mailnameInfo ->mailname ->forwarding ->address ));
96+ $ this ->assertSame (2 , count ($ mailnameInfo ->mailname ->alias ));
97+
98+ static ::$ client ->mail ()->delete ('name ' , 'test ' , static ::$ webspace ->id );
99+ }
100+
50101 public function testDelete ()
51102 {
52103 $ mailname = static ::$ client ->mail ()->create ('test ' , static ::$ webspace ->id );
You can’t perform that action at this time.
0 commit comments