Issue #3086001 by Krzysztof Domański, alexpott: CreateSampleEntityTest::testSampleValueContentEntity can randomly fail
parent
1d8712ff74
commit
42034e76d7
|
@ -43,7 +43,8 @@ class PathAliasStorage extends SqlContentEntityStorage {
|
|||
*/
|
||||
public function createWithSampleValues($bundle = FALSE, array $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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue