protected function LogTestBase::createLogEntity in Log entity 8
Parameters
array $values:
Return value
3 calls to LogTestBase::createLogEntity()
- LogCRUDTest::testDeleteLog in src/
Tests/ LogCRUDTest.php - Delete log entity.
- LogCRUDTest::testEditLog in src/
Tests/ LogCRUDTest.php - Edit log entity.
- LogCRUDTest::testViewLog in src/
Tests/ LogCRUDTest.php - Display log entity.
File
- src/
Tests/ LogTestBase.php, line 71
Class
- LogTestBase
- Tests the Log CRUD.
Namespace
Drupal\log\TestsCode
protected function createLogEntity($values = []) {
$storage = \Drupal::service('entity_type.manager')
->getStorage('log');
$entity = $storage
->create($values + [
'name' => $this
->randomMachineName(),
'user_id' => $this->loggedInUser
->id(),
'created' => REQUEST_TIME,
'type' => 'default',
'done' => TRUE,
]);
return $entity;
}