File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
modules/apps/captcha/captcha-test/src/testIntegration/java/com/liferay/captcha/test/util Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 55
66package com .liferay .captcha .test .util ;
77
8+ import com .liferay .portal .kernel .model .Company ;
89import com .liferay .portal .kernel .portlet .PortletURLFactoryUtil ;
910import com .liferay .portal .kernel .portlet .url .builder .PortletURLBuilder ;
11+ import com .liferay .portal .kernel .service .CompanyLocalServiceUtil ;
1012import com .liferay .portal .kernel .service .LayoutLocalServiceUtil ;
1113import com .liferay .portal .kernel .test .util .TestPropsValues ;
1214import com .liferay .portal .kernel .theme .ThemeDisplay ;
@@ -84,13 +86,21 @@ private static MockHttpServletRequest _getMockHttpServletRequest()
8486 themeDisplay .setLayout (
8587 LayoutLocalServiceUtil .fetchLayout (TestPropsValues .getPlid ()));
8688 themeDisplay .setPlid (TestPropsValues .getPlid ());
87- themeDisplay .setPortalURL ("http://localhost:8080" );
89+
90+ Company company = CompanyLocalServiceUtil .getCompany (
91+ TestPropsValues .getCompanyId ());
92+
93+ themeDisplay .setPortalURL (
94+ "http://" + company .getVirtualHostname () + ":8080" );
95+
8896 themeDisplay .setScopeGroupId (TestPropsValues .getGroupId ());
8997 themeDisplay .setSiteGroupId (TestPropsValues .getGroupId ());
9098
9199 mockHttpServletRequest .setAttribute (
92100 WebKeys .THEME_DISPLAY , themeDisplay );
93101
102+ mockHttpServletRequest .setServerName (company .getVirtualHostname ());
103+
94104 return mockHttpServletRequest ;
95105 }
96106
You can’t perform that action at this time.
0 commit comments