File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
tests/TestCase/Controller/Component Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -300,10 +300,10 @@ public function getIdentityData(string $path): mixed
300300 * is cleared and then set to ensure that privilege escalation
301301 * and de-escalation include side effects like session rotation.
302302 *
303- * @param \ArrayAccess $identity Identity data to persist.
303+ * @param \ArrayAccess|array $identity Identity data to persist.
304304 * @return $this
305305 */
306- public function setIdentity (ArrayAccess $ identity )
306+ public function setIdentity (ArrayAccess | array $ identity )
307307 {
308308 $ controller = $ this ->getController ();
309309 $ service = $ this ->getAuthenticationService ();
Original file line number Diff line number Diff line change @@ -214,6 +214,11 @@ public function testSetIdentity()
214214 $ component ->setIdentity ($ this ->identityData );
215215 $ result = $ component ->getIdentity ();
216216 $ this ->assertSame ($ this ->identityData , $ result ->getOriginalData ());
217+
218+ $ identityData = ['id ' => 99 ];
219+ $ component ->setIdentity ($ identityData );
220+ $ result = $ component ->getIdentity ();
221+ $ this ->assertSame ($ identityData , $ result ->getOriginalData ());
217222 }
218223
219224 /**
You can’t perform that action at this time.
0 commit comments