Skip to content
Snippets Groups Projects
Commit b6948032 authored by Simon Urli's avatar Simon Urli
Browse files

XWIKI-20651: Pt_br (Pt_br) and Zh_tw (Zh_Tw) languages displayed in drop-downs...

XWIKI-20651: Pt_br (Pt_br) and Zh_tw (Zh_Tw) languages displayed in drop-downs which cause many "Invalid locale" warnings if selected

  * Fix bad API calls in tests
parent 42edb78c
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,8 @@
*/
package org.xwiki.rendering.internal.resolver;
import java.util.List;
import javax.inject.Named;
import org.junit.jupiter.api.Test;
......@@ -67,7 +69,7 @@ void resolve()
DocumentReference baseReference = new DocumentReference("wiki", "space", "document");
PageAttachmentReference pageAttachmentReference =
new PageAttachmentReference("file.txt", new PageReference("wiki", "page1", "page2"));
DocumentReference documentReference = new DocumentReference("wiki", "page1", "page2", "WebHome");
DocumentReference documentReference = new DocumentReference("wiki", List.of("page1", "page2"), "WebHome");
when(this.currentEntityReferenceResolver.resolve(pageAttachment.getBaseReferences().get(0), EntityType.DOCUMENT,
null)).thenReturn(baseReference);
when(this.defaultStringAttachmentReferenceResolver.resolve("page1/page2/file.txt", baseReference))
......
......@@ -19,6 +19,8 @@
*/
package org.xwiki.rendering.internal.resolver;
import java.util.List;
import javax.inject.Named;
import org.junit.jupiter.api.Test;
......@@ -65,7 +67,7 @@ void resolve()
DocumentReference baseReference = new DocumentReference("wiki", "space", "document");
PageReference pageReference = new PageReference("wiki", "page1", "page2");
DocumentReference documentReference = new DocumentReference("wiki", "page1", "page2", "WebHome");
DocumentReference documentReference = new DocumentReference("wiki", List.of("page1", "page2"), "WebHome");
when(this.currentEntityReferenceResolver.resolve(page.getBaseReferences().get(0), EntityType.DOCUMENT, null))
.thenReturn(baseReference);
when(this.defaultPageReferenceResolver.resolve("page1/page2", baseReference)).thenReturn(pageReference);
......
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