protected function UserBehaviorInvocationTest::createEntityBundle in Rabbit Hole 2.x
Same name and namespace in other branches
- 8 modules/rh_user/tests/src/Functional/UserBehaviorInvocationTest.php \Drupal\Tests\rh_taxonomy\Functional\UserBehaviorInvocationTest::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_user/ tests/ src/ Functional/ UserBehaviorInvocationTest.php, line 27
Class
- UserBehaviorInvocationTest
- Test that rabbit hole behaviors are invoked correctly for user entities.
Namespace
Drupal\Tests\rh_taxonomy\FunctionalCode
protected function createEntityBundle($action = NULL) {
// We can't create a new bundle, but we can save Rabbit Hole settings.
if (isset($action)) {
$this->behaviorSettingsManager
->saveBehaviorSettings([
'action' => $action,
'allow_override' => TRUE,
], 'user', NULL);
}
return NULL;
}