Search in sources :

Example 1 with MacroResolver

use of org.craftercms.engine.macro.MacroResolver in project engine by craftercms.

the class FolderScanningSiteListResolverTest method createMacroResolver.

private MacroResolver createMacroResolver() {
    MacroResolver macroResolver = mock(MacroResolver.class);
    doAnswer(new Answer<String>() {

        @Override
        public String answer(InvocationOnMock invocation) throws Throwable {
            return (String) invocation.getArguments()[0];
        }
    }).when(macroResolver).resolveMacros(anyString());
    return macroResolver;
}
Also used : InvocationOnMock(org.mockito.invocation.InvocationOnMock) Mockito.anyString(org.mockito.Mockito.anyString) MacroResolver(org.craftercms.engine.macro.MacroResolver)

Aggregations

MacroResolver (org.craftercms.engine.macro.MacroResolver)1 Mockito.anyString (org.mockito.Mockito.anyString)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1