File tree 1 file changed +51
-0
lines changed
1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,57 @@ public function testCreate()
47
47
static ::$ client ->mail ()->delete ('name ' , $ mailname ->name , static ::$ webspace ->id );
48
48
}
49
49
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
+
50
101
public function testDelete ()
51
102
{
52
103
$ mailname = static ::$ client ->mail ()->create ('test ' , static ::$ webspace ->id );
You can’t perform that action at this time.
0 commit comments