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)
6565 $ response = $ this ->_client ->request ($ packet , \PleskX \Api \Client::RESPONSE_FULL );
6666
6767 $ 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 );
7070 }
7171
7272 return $ items ;
Original file line number Diff line number Diff line change @@ -51,4 +51,14 @@ public function testDelete()
5151 }
5252 }
5353
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+ }
5464}
You can’t perform that action at this time.
0 commit comments