Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-functional-testing-framework
dev
tests
unit
Magento
FunctionalTestFramework
DataGenerator
Handlers
CredentialStoreTest.php
Go to the documentation of this file.
1
<?php
7
namespace
tests\unit\Magento\FunctionalTestFramework\DataGenerator\Handlers
;
8
9
use
Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore
;
10
use
Magento\FunctionalTestingFramework\Util\MagentoTestCase
;
11
use AspectMock\Test as AspectMock;
12
13
class
CredentialStoreTest
extends
MagentoTestCase
14
{
15
19
public
function
testBasicEncryptDecrypt
()
20
{
21
$testKey =
'myKey'
;
22
$testValue =
'myValue'
;
23
24
AspectMock::double(CredentialStore::class, [
25
'readInCredentialsFile'
=> [
"$testKey=$testValue"
]
26
]);
27
28
$encryptedCred =
CredentialStore::getInstance
()->getSecret($testKey);
29
30
// assert the value we've gotten is in fact not identical to our test value
31
$this->assertNotEquals($testValue, $encryptedCred);
32
33
$actualValue =
CredentialStore::getInstance
()->decryptSecretValue($encryptedCred);
34
35
// assert that we are able to successfully decrypt our secret value
36
$this->assertEquals($testValue, $actualValue);
37
}
38
}
tests\unit\Magento\FunctionalTestFramework\DataGenerator\Handlers\CredentialStoreTest\testBasicEncryptDecrypt
testBasicEncryptDecrypt()
Definition:
CredentialStoreTest.php:19
Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore
Definition:
CredentialStore.php:14
tests\unit\Magento\FunctionalTestFramework\DataGenerator\Handlers\CredentialStoreTest
Definition:
CredentialStoreTest.php:13
tests\unit\Magento\FunctionalTestFramework\DataGenerator\Handlers
Definition:
CredentialStoreTest.php:7
Magento\FunctionalTestingFramework\DataGenerator\Handlers\CredentialStore\getInstance
static getInstance()
Definition:
CredentialStore.php:51
Magento\FunctionalTestingFramework\Util\MagentoTestCase
Definition:
MagentoTestCase.php:15