use of com.enonic.xp.site.SiteConfigs in project xp by enonic.
the class SiteConfigProcessorTest method test_multiple_site_configs_with_html_areas.
@Test
public void test_multiple_site_configs_with_html_areas() throws Exception {
final Form form1 = Form.create().addFormItem(Input.create().name("text1").label("text1").inputType(InputTypeName.HTML_AREA).build()).build();
final Form form2 = Form.create().addFormItem(Input.create().name("text2").label("text2").inputType(InputTypeName.HTML_AREA).build()).build();
final SiteConfigs siteConfigs = SiteConfigs.create().add(SiteConfig.create().application(applicationKey1).config(new PropertyTree()).build()).add(SiteConfig.create().application(applicationKey2).config(new PropertyTree()).build()).build();
final PatternIndexConfigDocument result = processConfigs(siteConfigs, form1, form2);
assertEquals(2, result.getPathIndexConfigs().size());
assertEquals("htmlStripper", result.getConfigForPath(PropertyPath.from(ContentPropertyNames.DATA, SITECONFIG, "config", "text1")).getIndexValueProcessors().get(0).getName());
assertEquals("htmlStripper", result.getConfigForPath(PropertyPath.from(ContentPropertyNames.DATA, SITECONFIG, "config", "text2")).getIndexValueProcessors().get(0).getName());
}
Aggregations