Were testing some modperl code and some of the modules are dependant apon
a request object to get data from.

The two options that would seem availble are either FakeRequest.pm or to
dupe the module and put fake data into it for modules that require it.

Option one seems to be the better option then having to keep multiple
fakes in sync with the oiginal as it changes.

I looked into Apache::FakeRequest and it appears that It just returns the
sub name as the data for the sub which doesn't provide true input.  I've
been messing with a test this afternoon, but i figured i should at least
check and make sure that there wasn't one already out there that matched
well with what i wanted and two that fake request wouldn't do what i
needed.

What I'm writing is one that reads a file instead of getting the data from
apache and then parses that and makes all the data availble from it
mimicing an apache request object.

For testing the whole codebase,  We are prepping something more like
the mod perl make test where it starts a server etc, but for just testing
a function, we want to be able to have it in a test script and see the
output from it.

thanks for any info/pointers.

Scott


Reply via email to