protected function TaxonomyBehaviorInvocationTest::createEntity in Rabbit Hole 8
Same name and namespace in other branches
- 2.x modules/rh_taxonomy/tests/src/Functional/TaxonomyBehaviorInvocationTest.php \Drupal\Tests\rh_taxonomy\Functional\TaxonomyBehaviorInvocationTest::createEntity()
Creates new entity.
Parameters
string $action: Rabbit Hole action.
Return value
\Drupal\Core\Entity\EntityInterface Created entity.
Overrides RabbitHoleBehaviorInvocationTestBase::createEntity
File
- modules/
rh_taxonomy/ tests/ src/ Functional/ TaxonomyBehaviorInvocationTest.php, line 51
Class
- TaxonomyBehaviorInvocationTest
- Test that rabbit hole behaviors are invoked correctly for taxonomy terms.
Namespace
Drupal\Tests\rh_taxonomy\FunctionalCode
protected function createEntity($action = NULL) {
$values = [];
if (isset($action)) {
$values['rh_action'] = $action;
}
return $this
->createTerm($this->vocabulary, $values);
}