Merge branch 'dev' into feature/quality-checks
This commit is contained in:
@@ -577,6 +577,24 @@ $cases = [
|
||||
assertPageCreation(str_contains($html, 'Each language shows its own saved values; missing translations are left blank instead of using fallback text.'), 'Locale-specific editing guidance was not shown.');
|
||||
$_POST = [];
|
||||
},
|
||||
'homepage routes persist for the submitted English and German values' => function (): void {
|
||||
resetPageCreationDatabase();
|
||||
$payload = pageCreationPayload([
|
||||
'name' => 'Hom',
|
||||
'layout' => 'master',
|
||||
'title' => ['en' => 'Home', 'de' => 'Start'],
|
||||
'route' => ['en' => '/', 'de' => '/de/'],
|
||||
]);
|
||||
|
||||
$page = (new PageRepository())->create($payload);
|
||||
|
||||
global $phpb_db;
|
||||
$translations = $phpb_db->rows('page_translations');
|
||||
assertPageCreation($page === true, 'The submitted homepage payload did not create a page.');
|
||||
assertPageCreation(count($translations) === 2, 'The homepage did not persist both localized translations.');
|
||||
assertPageCreation($translations[0]['route'] === '/', 'The English homepage route was not preserved.');
|
||||
assertPageCreation($translations[1]['route'] === '/de/', 'The German homepage route was not preserved.');
|
||||
},
|
||||
'generated routes persist for every active locale' => function (): void {
|
||||
resetPageCreationDatabase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user