You are here

protected function FieldEncryptTestBase::createTestNode in Field Encryption 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/FieldEncryptTestBase.php \Drupal\Tests\field_encrypt\Functional\FieldEncryptTestBase::createTestNode()

Creates a test node.

4 calls to FieldEncryptTestBase::createTestNode()
CacheTest::setUp in tests/src/Functional/CacheTest.php
@TODO: Simplify setUp() by extending EncryptTestBase when https://www.drupal.org/node/2692387 lands.
ConfigurableFieldTest::testEncryptFieldNormal in tests/src/Functional/ConfigurableFieldTest.php
Test encrypting fields.
ConfigurableFieldTest::testEncryptFieldRevision in tests/src/Functional/ConfigurableFieldTest.php
Test encrypting fields with revisions.
ConfigurableFieldTest::testEncryptFieldTranslation in tests/src/Functional/ConfigurableFieldTest.php
Test encrypting fields with translations.
1 method overrides FieldEncryptTestBase::createTestNode()
EncryptingExistingDataTest::createTestNode in tests/src/Functional/EncryptingExistingDataTest.php
Creates a test node.

File

tests/src/Functional/FieldEncryptTestBase.php, line 135

Class

FieldEncryptTestBase
Base test class for field_encrypt.

Namespace

Drupal\Tests\field_encrypt\Functional

Code

protected function createTestNode() {
  $this->testNode = $this
    ->createNode([
    'field_test_single' => [
      [
        'value' => "Lorem ipsum dolor sit amet.",
        'summary' => "Lorem ipsum",
        'format' => filter_default_format(),
      ],
    ],
    'field_test_multi' => [
      [
        'value' => "one",
      ],
      [
        'value' => "two",
      ],
      [
        'value' => "three",
      ],
    ],
  ]);
}