Example usage for com.liferay.portal.kernel.util FriendlyURLNormalizerUtil normalizeWithEncoding

List of usage examples for com.liferay.portal.kernel.util FriendlyURLNormalizerUtil normalizeWithEncoding

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util FriendlyURLNormalizerUtil normalizeWithEncoding.

Prototype

public static String normalizeWithEncoding(String friendlyURL) 

Source Link

Usage

From source file:com.liferay.layout.test.LayoutFriendlyURLTest.java

License:Open Source License

@Test
public void testFriendlyURLWithSpecialCharacter() throws Exception {
    Map<Locale, String> friendlyURLMap = new HashMap<>();

    friendlyURLMap.put(LocaleUtil.US, "/Football");

    addLayout(_group.getGroupId(), false, friendlyURLMap);

    String friendlyURL = FriendlyURLNormalizerUtil.normalizeWithEncoding("/Football");

    Layout layout = LayoutLocalServiceUtil.fetchLayoutByFriendlyURL(_group.getGroupId(), false, friendlyURL);

    Assert.assertNotNull(layout);/*  w  ww.ja  va2s .  c om*/
}