FieldKernelTestBase::$fieldTestData

Same name in other branches
  1. 9 core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::fieldTestData
  2. 8.9.x core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::fieldTestData
  3. 11.x core/modules/field/tests/src/Kernel/FieldKernelTestBase.php \Drupal\Tests\field\Kernel\FieldKernelTestBase::fieldTestData

Bag of created field storages and fields.

Allows easy access to test field storage/field names/IDs/objects via:

  • $this->fieldTestData->field_name[suffix]
  • $this->fieldTestData->field_storage[suffix]
  • $this->fieldTestData->field_storage_uuid[suffix]
  • $this->fieldTestData->field[suffix]
  • $this->fieldTestData->field_definition[suffix]

Type: \ArrayObject

See also

\Drupal\field\Tests\FieldUnitTestBase::createFieldWithStorage()

File

core/modules/field/tests/src/Kernel/FieldKernelTestBase.php, line 45

Class

FieldKernelTestBase
Parent class for Field API unit tests.

Namespace

Drupal\Tests\field\Kernel

Code

protected $fieldTestData;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.