UserBehaviorInvocationTest.php in Rabbit Hole 8
File
modules/rh_user/tests/src/Functional/UserBehaviorInvocationTest.php
View source
<?php
namespace Drupal\Tests\rh_taxonomy\Functional;
use Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorInvocationTestBase;
class UserBehaviorInvocationTest extends RabbitHoleBehaviorInvocationTestBase {
protected $entityType = 'user';
public static $modules = [
'rh_user',
'user',
];
protected function createEntityBundle($action = NULL) {
if (isset($action)) {
$this->behaviorSettingsManager
->saveBehaviorSettings([
'action' => $action,
'allow_override' => TRUE,
], 'user', NULL);
}
return NULL;
}
protected function createEntity($action = NULL) {
$values = [];
if (isset($action)) {
$values['rh_action'] = $action;
}
return $this
->drupalCreateUser([], $this
->randomMachineName(), FALSE, $values);
}
protected function getViewPermissions() {
return [
'access user profiles',
];
}
}