class CommerceTest in Field Encryption 3.0.x
Tests field encryption settings with the Commerce module.
@group field_encrypt
Hierarchy
- class \Drupal\Tests\field_encrypt\Functional\FieldEncryptTestBase extends \Drupal\Tests\encrypt\Functional\EncryptTestBase uses NodeCreationTrait
- class \Drupal\Tests\field_encrypt\Functional\CommerceTest
Expanded class hierarchy of CommerceTest
File
- tests/
src/ Functional/ CommerceTest.php, line 10
Namespace
Drupal\Tests\field_encrypt\FunctionalView source
class CommerceTest extends FieldEncryptTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'commerce',
];
/**
* Tests that the admin forms work when commerce is installed.
*/
public function testSettingsPage() {
$this
->drupalLogin($this
->createUser([
'administer field encryption',
]));
$this
->drupalGet('admin/config/system/field-encrypt');
$this
->assertSession()
->statusCodeEquals(200);
// Ensure that special handling for preconfigured definitions works.
$this
->assertSession()
->elementTextContains('css', '#edit-default-properties-reference-field-uientity-referencenode--wrapper', 'Content properties');
$this
->drupalGet('admin/config/system/field-encrypt/field-overview');
$this
->assertSession()
->statusCodeEquals(200);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommerceTest:: |
public static | property |
Overrides FieldEncryptTestBase:: |
|
CommerceTest:: |
public | function | Tests that the admin forms work when commerce is installed. | |
FieldEncryptTestBase:: |
protected | property | The entity manager service. | 1 |
FieldEncryptTestBase:: |
protected | property | The page node type. | |
FieldEncryptTestBase:: |
protected | property | A test node. | |
FieldEncryptTestBase:: |
protected | function | Creates a test node. | 1 |
FieldEncryptTestBase:: |
protected | function | Set up storage settings for test fields. | 1 |
FieldEncryptTestBase:: |
protected | function | Set up translation settings for content translation test. | |
FieldEncryptTestBase:: |
protected | function | @TODO: Simplify setUp() by extending EncryptTestBase when https://www.drupal.org/node/2692387 lands. | 1 |
NodeCreationTrait:: |
protected | function | Creates a node based on default settings. | |
NodeCreationTrait:: |
public | function | Get a node from the database based on its title. |