protected function TaxonomyBehaviorInvocationTest::createEntityBundle in Rabbit Hole 2.x
Same name and namespace in other branches
- 8 modules/rh_taxonomy/tests/src/Functional/TaxonomyBehaviorInvocationTest.php \Drupal\Tests\rh_taxonomy\Functional\TaxonomyBehaviorInvocationTest::createEntityBundle()
Creates new entity bundle.
Parameters
string $action: Rabbit Hole action.
Return value
string ID of the created bundle.
Overrides RabbitHoleBehaviorInvocationTestBase::createEntityBundle
File
- modules/
rh_taxonomy/ tests/ src/ Functional/ TaxonomyBehaviorInvocationTest.php, line 37
Class
- TaxonomyBehaviorInvocationTest
- Test that rabbit hole behaviors are invoked correctly for taxonomy terms.
Namespace
Drupal\Tests\rh_taxonomy\FunctionalCode
protected function createEntityBundle($action = NULL) {
$this->vocabulary = $this
->createVocabulary();
if (isset($action)) {
$this->behaviorSettingsManager
->saveBehaviorSettings([
'action' => $action,
'allow_override' => TRUE,
], 'taxonomy_vocabulary', $this->vocabulary
->id());
}
return $this->vocabulary
->id();
}