Skip to content
Snippets Groups Projects
Commit 42034e76 authored by catch's avatar catch
Browse files

Issue #3086001 by Krzysztof Domański, alexpott:...

Issue #3086001 by Krzysztof Domański, alexpott: CreateSampleEntityTest::testSampleValueContentEntity can randomly fail
parent 1d8712ff
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -43,7 +43,8 @@ protected function invokeHook($hook, EntityInterface $entity) { ...@@ -43,7 +43,8 @@ protected function invokeHook($hook, EntityInterface $entity) {
*/ */
public function createWithSampleValues($bundle = FALSE, array $values = []) { public function createWithSampleValues($bundle = FALSE, array $values = []) {
$entity = parent::createWithSampleValues($bundle, ['path' => '/<front>'] + $values); $entity = parent::createWithSampleValues($bundle, ['path' => '/<front>'] + $values);
$entity->set('alias', '/' . $entity->get('alias')->value); // Ensure the alias is only 255 characters long.
$entity->set('alias', substr('/' . $entity->get('alias')->value, 0, 255));
return $entity; return $entity;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment