protected function TaxonomyBehaviorSettingsFormTest::createEntity in Rabbit Hole 8
Same name and namespace in other branches
- 2.x modules/rh_taxonomy/tests/src/Functional/TaxonomyBehaviorSettingsFormTest.php \Drupal\Tests\rh_taxonomy\Functional\TaxonomyBehaviorSettingsFormTest::createEntity()
Creates new entity.
Parameters
string $action: Rabbit Hole action.
Return value
int ID of the created entity.
Overrides RabbitHoleBehaviorSettingsFormTestBase::createEntity
File
- modules/
rh_taxonomy/ tests/ src/ Functional/ TaxonomyBehaviorSettingsFormTest.php, line 69
Class
- TaxonomyBehaviorSettingsFormTest
- Test the functionality of the rabbit hole form additions to the taxonomy.
Namespace
Drupal\Tests\rh_taxonomy\FunctionalCode
protected function createEntity($action = NULL) {
$values = [];
if (isset($action)) {
$values['rh_action'] = $action;
}
return $this
->createTerm($this->bundle, $values)
->id();
}