config = [ 'backend' => 'key', 'settings' => [ 'registrations' => [ [ 'keyHandle' => 'keyHandle', 'publicKey' => 'publicKey', 'certificate' => 'certificate', 'counter' => -1, ], ], ], ]; $key = new Key($twoFactor); $actual = $key->getRegistrations(); $expected = [ (object) [ 'keyHandle' => 'keyHandle', 'publicKey' => 'publicKey', 'certificate' => 'certificate', 'counter' => -1, 'index' => 0, ], ]; self::assertEquals($expected, $actual); } }