protected function FieldRedirectionResultBuilderLinkTest::createTestEntity in Field Redirection 8.2
Creates a test entity.
Parameters
array $values: Optional values to create with.
Return value
\Drupal\Core\Entity\EntityInterface The entity.
4 calls to FieldRedirectionResultBuilderLinkTest::createTestEntity()
- FieldRedirectionResultBuilderLinkTest::testFieldRedirectionResult404OnEmpty in tests/
src/ Kernel/ FieldRedirectionResultBuilderLinkTest.php - Tests the 404_on_empty setting.
- FieldRedirectionResultBuilderLinkTest::testFieldRedirectionResultBuilderDenyStates in tests/
src/ Kernel/ FieldRedirectionResultBuilderLinkTest.php - Tests builder.
- FieldRedirectionResultBuilderLinkTest::testFieldRedirectionResultBuilderSuccess in tests/
src/ Kernel/ FieldRedirectionResultBuilderLinkTest.php - Tests the builder for redirect state.
- FieldRedirectionResultBuilderLinkTest::testFieldRedirectionResultMaintenanceMode in tests/
src/ Kernel/ FieldRedirectionResultBuilderLinkTest.php - Tests the maintenance mode.
File
- tests/
src/ Kernel/ FieldRedirectionResultBuilderLinkTest.php, line 217
Class
- FieldRedirectionResultBuilderLinkTest
- Defines a class for testing field redirection result builder for link fields.
Namespace
Drupal\Tests\field_redirection\KernelCode
protected function createTestEntity(array $values = []) : EntityInterface {
$entity = EntityTest::create($values + [
'name' => $this
->randomMachineName(),
'type' => 'entity_test',
]);
$entity
->save();
return $entity;
}