Catalyst-View-Template-PHP
view release on metacpan or search on metacpan
t/lib/TestApp/View/PHPTest.pm view on Meta::CPAN
sub preprocess {
my ($self, $c, $params) = @_;
if (%phptest_globals) {
while (my ($k,$v) = each %phptest_globals) {
$params->{$k} = $v;
}
%phptest_globals = ();
}
return $params;
}
sub postprocess {
my ($self, $c, $output) = @_;
if ($postprocessor) {
$output = $postprocessor->($output);
}
return $output;
}
sub set_callback {
my ($hook, $function) = @_;
PHP::options( $hook, $function );
}
1;
__END__
stuff that Catalyst::View::Template::PHP is supposed to do
that we ought to test:
call __PACKAGE__->config->{...} = ...
to set a PHP option
_X_ override preprocess
_X_ override postprocess
_X_ set $c->stash->{template}, $c->forward( 'TestApp::View::PHP' )
to get some script to do something
_X_ make requests that we expect to set $_GET
_X_ make requests that we expect to set $_POST
_X_ make requests that we expect to set $_REQUEST
_X_ make requests that we expect to set $_SERVER
_X_ make requests that we expect to set $_ENV
make requests that we expect to set $_COOKIE
_X_ make requests that we expect to set $_FILES
_X_ call move_uploaded_file or read_uploaded_file
_X_ header callbacks
_X_ redirect
override finalize
handle_warnings
handle_error
include_path config
debug config
different PHP directives -- request_order, variables_order,
file_uploads, upload_max_filesize, upload_tmp_dir,
post_max_size, max_input_time
( run in 2.200 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )