File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function generateScopedSearchKey(
5858 string $ searchKey ,
5959 array $ parameters
6060 ): string {
61- $ paramStr = json_encode ($ parameters , JSON_THROW_ON_ERROR );
61+ $ paramStr = json_encode (( object ) $ parameters , JSON_THROW_ON_ERROR );
6262 $ digest = base64_encode (
6363 hash_hmac (
6464 'sha256 ' ,
Original file line number Diff line number Diff line change @@ -73,4 +73,13 @@ public function testCanGenerateScopedSearchKey(): void
7373 ]);
7474 $ this ->assertEquals ($ scopedSearchKey , $ result );
7575 }
76+
77+ public function testGenerateScopedSearchKeyWithoutParams (): void
78+ {
79+ $ searchKey = "RN23GFr1s6jQ9kgSNg2O7fYcAUXU7127 " ;
80+ $ scopedSearchKey =
81+ "R2pFZkxSemhGZmEvOXd2WWpYNWVSTzF2N2xRSk9jQmlpZ2NpdnloUTFGYz1STjIze30= " ;
82+ $ result = $ this ->client ()->keys ->generateScopedSearchKey ($ searchKey , []);
83+ $ this ->assertEquals ($ scopedSearchKey , $ result );
84+ }
7685}
You can’t perform that action at this time.
0 commit comments