Skip to content
Snippets Groups Projects
Commit a1b7056a authored by Vincent Massol's avatar Vincent Massol Committed by Manuel Leduc
Browse files

XWIKI-21143: TextAreaClassTest#viewVelocityWikiWithoutOwnerDocument test...

XWIKI-21143: TextAreaClassTest#viewVelocityWikiWithoutOwnerDocument test failing when building with Java 17

(cherry picked from commit f6af2166)
parent 2ec96d1b
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
import com.xpn.xwiki.test.junit5.mockito.OldcoreTest; import com.xpn.xwiki.test.junit5.mockito.OldcoreTest;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.anyString;
...@@ -222,9 +223,8 @@ void viewVelocityWikiWithoutOwnerDocument() ...@@ -222,9 +223,8 @@ void viewVelocityWikiWithoutOwnerDocument()
verify(this.oldcore.getMockContextualAuthorizationManager(), never()).hasAccess(Right.SCRIPT); verify(this.oldcore.getMockContextualAuthorizationManager(), never()).hasAccess(Right.SCRIPT);
assertEquals(1, this.logCaptureExtension.size()); assertEquals(1, this.logCaptureExtension.size());
assertEquals("Error while getting the syntax corresponding to object [null]." assertTrue(this.logCaptureExtension.getMessage(0).matches("\\QError while getting the syntax corresponding to "
+ " Defaulting to using XWiki 1.0 syntax. Internal error [NullPointerException: ]", + "object [null]. Defaulting to using XWiki 1.0 syntax. Internal error [NullPointerException:\\E.*]"));
this.logCaptureExtension.getMessage(0));
} }
private XWikiDocument getSpyDocument() private XWikiDocument getSpyDocument()
......
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