Fix newHttpRequest, so it now uses a mock servlet context 3.1 compliant
This allows using `Wiki.engine().find( ServletContext, Properties )` on unit tests
@@ -216,12 +216,7 @@ public class TestEngine extends WikiEngine {
final MockHttpServletRequest request = new MockHttpServletRequest( "/JSPWiki", path ) {
@Override
public ServletContext getServletContext() { // stripes mock returns null
- return new MockServletContext( "/JSPWiki" ) {
- @Override
- public String getRealPath( final String path ) { // stripes mock returns null
- return path ;
- }
- };
+ return createServletContext( "/JSPWiki" );
}
};
request.setSession( new MockHttpSession( this.getServletContext() ) );
