public function FieldUiTest::createContentType in Field Formatter Filter 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/FieldUiTest.php \Drupal\Tests\field_formatter_filter\Kernel\FieldUiTest::createContentType()
Create our test content type.
Extend ContentTypeCreationTrait. I'm not sure, but it seems this is not expected to be a thing we use in Kernel tests - is it based around assuming a simpletest environment?
@inheritdoc
2 calls to FieldUiTest::createContentType()
- FieldUiTest::testConfiguringFilter in tests/
src/ Functional/ FieldUiTest.php - Test enabling the filter formatter. Check before, during and after.
- FieldUiTest::testCreateContentType in tests/
src/ Functional/ FieldUiTest.php - Tests creating and configuring a bundle.
File
- tests/
src/ Functional/ FieldUiTest.php, line 139
Class
- FieldUiTest
- Tests applying the filter formatter to a node.
Namespace
Drupal\Tests\field_formatter_filter\KernelCode
public function createContentType(array $values = []) {
// From ContentTypeCreationTrait.
$content_type = $this
->drupalCreateContentType($values);
// To avoid too many dependencies,
// -- just toggle off the 'display user' for view modes.
$content_type
->set('display_submitted', FALSE);
$content_type
->save();
}