function FieldTestBase::setUpFields
Same name in other branches
- 9 core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUpFields()
- 8.9.x core/modules/field/src/Tests/Views/FieldTestBase.php \Drupal\field\Tests\Views\FieldTestBase::setUpFields()
- 8.9.x core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUpFields()
- 11.x core/modules/field/tests/src/Functional/Views/FieldTestBase.php \Drupal\Tests\field\Functional\Views\FieldTestBase::setUpFields()
1 call to FieldTestBase::setUpFields()
- FieldUITest::setUp in core/
modules/ field/ tests/ src/ Functional/ Views/ FieldUITest.php - Sets up the test.
File
-
core/
modules/ field/ tests/ src/ Functional/ Views/ FieldTestBase.php, line 71
Class
- FieldTestBase
- Provides some helper methods for testing fieldapi integration into views.
Namespace
Drupal\Tests\field\Functional\ViewsCode
public function setUpFields($bundle = 'page') {
foreach ($this->fieldStorages as $key => $field_storage) {
$this->fields[$key] = FieldConfig::create([
'field_storage' => $field_storage,
'bundle' => $bundle,
]);
$this->fields[$key]
->save();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.