Issue #3086001 by Krzysztof Domański, alexpott: CreateSampleEntityTest::testSampleValueContentEntity can randomly fail

merge-requests/55/head
catch 2019-10-09 11:03:47 +01:00
parent 1d8712ff74
commit 42034e76d7
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}