test_requires 'Test::Exception';
test_requires 'Test::More' => '0.88';
test_requires 'Data::Dump';
+test_requires 'HTTP::Request::Common';
# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
--- /dev/null
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
+use Test::More;
+use Plack::Test;
+use TestApp;
+use HTTP::Request::Common;
+
+my $warning;
+local $SIG{__WARN__} = sub { $warning = $_[0] };
+
+TestApp->setup_engine('PSGI');
+my $app = sub { TestApp->run(@_) };
+
+like $warning, qr/You are running Catalyst\:\:Engine\:\:PSGI/,
+ 'got deprecation alert warning';
+
+test_psgi $app, sub {
+ my $cb = shift;
+ eval {
+ my $TIMEOUT_IN_SECONDS = 5;
+ local $SIG{ALRM} = sub { die "alarm\n" };
+ alarm($TIMEOUT_IN_SECONDS);
+
+ my $res = $cb->(GET "/");
+ is $res->content, "root index", 'got expected content';
+ like $warning, qr/env as a writer/, 'got deprecation alert warning';
+
+ alarm(0);
+ 1
+ } || fail "$@ problem";
+};
+
+done_testing;
+