File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ public function _get($keyId = null)
65
65
$ response = $ this ->_client ->request ($ packet , \PleskX \Api \Client::RESPONSE_FULL );
66
66
67
67
$ items = [];
68
- foreach ($ response ->xpath ('//result ' ) as $ xmlResult ) {
69
- $ items [] = new Struct \Info ($ xmlResult -> key_info );
68
+ foreach ($ response ->xpath ('//result/key_info ' ) as $ keyInfo ) {
69
+ $ items [] = new Struct \Info ($ keyInfo );
70
70
}
71
71
72
72
return $ items ;
Original file line number Diff line number Diff line change @@ -51,4 +51,14 @@ public function testDelete()
51
51
}
52
52
}
53
53
54
+ public function testListEmpty ()
55
+ {
56
+ $ keys = $ this ->_client ->secretKey ()->getAll ();
57
+ foreach ($ keys as $ key ) {
58
+ $ this ->_client ->secretKey ()->delete ($ key ->key );
59
+ }
60
+
61
+ $ keys = $ this ->_client ->secretKey ()->getAll ();
62
+ $ this ->assertEquals (0 , count ($ keys ));
63
+ }
54
64
}
You can’t perform that action at this time.
0 commit comments