You are here

class CommerceTest in Field Encryption 3.0.x

Tests field encryption settings with the Commerce module.

@group field_encrypt

Hierarchy

Expanded class hierarchy of CommerceTest

File

tests/src/Functional/CommerceTest.php, line 10

Namespace

Drupal\Tests\field_encrypt\Functional
View 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

Namesort descending Modifiers Type Description Overrides
CommerceTest::$modules public static property Overrides FieldEncryptTestBase::$modules
CommerceTest::testSettingsPage public function Tests that the admin forms work when commerce is installed.
FieldEncryptTestBase::$entityTypeManager protected property The entity manager service. 1
FieldEncryptTestBase::$nodeType protected property The page node type.
FieldEncryptTestBase::$testNode protected property A test node.
FieldEncryptTestBase::createTestNode protected function Creates a test node. 1
FieldEncryptTestBase::setFieldStorageSettings protected function Set up storage settings for test fields. 1
FieldEncryptTestBase::setTranslationSettings protected function Set up translation settings for content translation test.
FieldEncryptTestBase::setUp protected function @TODO: Simplify setUp() by extending EncryptTestBase when https://www.drupal.org/node/2692387 lands. 1
NodeCreationTrait::createNode protected function Creates a node based on default settings.
NodeCreationTrait::getNodeByTitle public function Get a node from the database based on its title.