--TEST-- MongoDB\Driver\ClientEncryption::createDataKey() --SKIPIF-- createClientEncryption([ 'keyVaultNamespace' => CSFLE_KEY_VAULT_NS, 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(CSFLE_LOCAL_KEY, 0)]], ]); $keyId = $clientEncryption->createDataKey('local'); var_dump($keyId); $key = $clientEncryption->getKey($keyId); var_dump($key->_id == $keyId); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(16) "%a" ["type"]=> int(4) } bool(true) ===DONE===