function EntityReferenceRevisionsAutocompleteTest::createBlockContentType in Entity Reference Revisions 8
Create a block_content bundle.
Parameters
$parameters: An assoc array with name (human readable) and type (bundle machine name) as keys.
1 call to EntityReferenceRevisionsAutocompleteTest::createBlockContentType()
- EntityReferenceRevisionsAutocompleteTest::testEntityReferenceRevisionsAutocompleteProcessing in tests/
src/ Functional/ EntityReferenceRevisionsAutocompleteTest.php - Test for autocomplete processing.
File
- tests/
src/ Functional/ EntityReferenceRevisionsAutocompleteTest.php, line 141
Class
- EntityReferenceRevisionsAutocompleteTest
- Tests the entity_reference_revisions autocomplete.
Namespace
Drupal\Tests\entity_reference_revisions\FunctionalCode
function createBlockContentType($parameters) {
$label = $parameters['name'];
$machine_name = $parameters['type'];
$edit = array(
'label' => $label,
'id' => $machine_name,
'revision' => TRUE,
);
$this
->drupalGet('admin/structure/block/block-content/types/add');
$this
->submitForm($edit, 'Save');
$this
->assertText($label);
}