--TEST-- MongoDB\Driver\ClientEncryption::getKeys() --SKIPIF-- createClientEncryption([ 'keyVaultNamespace' => CSFLE_KEY_VAULT_NS, 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(CSFLE_LOCAL_KEY, 0)]], ]); $key1Id = $clientEncryption->createDataKey('local'); $key2Id = $clientEncryption->createDataKey('local'); $keyIds = []; foreach ($clientEncryption->getKeys() as $key) { $keyIds[] = $key->_id; } var_dump(count($keyIds)); var_dump(in_array($key1Id, $keyIds)); var_dump(in_array($key2Id, $keyIds)); ?> ===DONE=== --EXPECT-- int(2) bool(true) bool(true) ===DONE===