1 package Catalyst::Engine::Test;
4 use base 'Catalyst::Engine::HTTP::Base';
10 Catalyst::Engine::Test - Catalyst Test Engine
14 A script using the Catalyst::Engine::Test module might look like:
19 $ENV{CATALYST_ENGINE} = 'Test';
23 use lib '/path/to/MyApp/lib';
26 MyApp->run('/a/path');
30 This is the Catalyst engine specialized for testing.
32 =head1 OVERLOADED METHODS
34 This class overloads some methods from C<Catalyst::Engine::HTTP::Base>.
43 my ( $class, $request ) = @_;
45 $request = Catalyst::Utils::request($request);
48 'Host' => sprintf( '%s:%d', $request->uri->host, $request->uri->port )
51 my $http = Catalyst::Engine::HTTP::Base::struct->new(
52 address => '127.0.0.1',
53 hostname => 'localhost',
55 response => HTTP::Response->new
58 $http->response->date(time);
60 $class->handler($http);
62 return $http->response;
73 Sebastian Riedel, C<sri@cpan.org>
74 Christian Hansen, C<ch@ngmedia.com>
78 This program is free software, you can redistribute it and/or modify it under
79 the same terms as Perl itself.