[Catalyst-commits] r11564 -
Catalyst-Plugin-Session-State-URI/trunk/t
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Oct 16 15:15:52 GMT 2009
Author: rafl
Date: 2009-10-16 15:15:52 +0000 (Fri, 16 Oct 2009)
New Revision: 11564
Modified:
Catalyst-Plugin-Session-State-URI/trunk/t/basic.t
Catalyst-Plugin-Session-State-URI/trunk/t/param.t
Catalyst-Plugin-Session-State-URI/trunk/t/uri_find_regression_avoid_RT44593.t
Log:
Make use of the real session plugin in the tests, so we can get _session_plugin_config from there.
Modified: Catalyst-Plugin-Session-State-URI/trunk/t/basic.t
===================================================================
--- Catalyst-Plugin-Session-State-URI/trunk/t/basic.t 2009-10-16 15:10:00 UTC (rev 11563)
+++ Catalyst-Plugin-Session-State-URI/trunk/t/basic.t 2009-10-16 15:15:52 UTC (rev 11564)
@@ -33,9 +33,16 @@
my $uri_to_plaintext = $req->base . "foo.txt";
my $uri_to_picture = $req->base . "foo.png";
-my $cxt =
- Test::MockObject::Extends->new("Catalyst::Plugin::Session::State::URI");
+{
+ package MockCtx;
+ use base qw/
+ Catalyst::Plugin::Session
+ Catalyst::Plugin::Session::State::URI
+ /;
+}
+my $cxt = Test::MockObject::Extends->new("MockCtx");
+
$cxt->set_always( config => {} );
$cxt->set_always( request => $req );
$cxt->set_always( response => $res );
Modified: Catalyst-Plugin-Session-State-URI/trunk/t/param.t
===================================================================
--- Catalyst-Plugin-Session-State-URI/trunk/t/param.t 2009-10-16 15:10:00 UTC (rev 11563)
+++ Catalyst-Plugin-Session-State-URI/trunk/t/param.t 2009-10-16 15:15:52 UTC (rev 11564)
@@ -21,9 +21,16 @@
my $res = Test::MockObject::Extends->new( HashObj->new );
-my $cxt =
- Test::MockObject::Extends->new("Catalyst::Plugin::Session::State::URI");
+{
+ package MockCtx;
+ use base qw/
+ Catalyst::Plugin::Session
+ Catalyst::Plugin::Session::State::URI
+ /;
+}
+my $cxt = Test::MockObject::Extends->new("MockCtx");
+
$cxt->set_always( config => { 'Plugin::Session' => { param => 'sid' } } );
$cxt->set_always( request => $req );
$cxt->set_always( response => $res );
Modified: Catalyst-Plugin-Session-State-URI/trunk/t/uri_find_regression_avoid_RT44593.t
===================================================================
--- Catalyst-Plugin-Session-State-URI/trunk/t/uri_find_regression_avoid_RT44593.t 2009-10-16 15:10:00 UTC (rev 11563)
+++ Catalyst-Plugin-Session-State-URI/trunk/t/uri_find_regression_avoid_RT44593.t 2009-10-16 15:15:52 UTC (rev 11564)
@@ -23,9 +23,16 @@
my $uri = "http://www.woobling.org/";
-my $cxt =
- Test::MockObject::Extends->new("Catalyst::Plugin::Session::State::URI");
+{
+ package MockCtx;
+ use base qw/
+ Catalyst::Plugin::Session
+ Catalyst::Plugin::Session::State::URI
+ /;
+}
+my $cxt = Test::MockObject::Extends->new("MockCtx");
+
$cxt->set_always( config => {} );
$cxt->set_always( request => $req );
$cxt->set_always( response => $res );
More information about the Catalyst-commits
mailing list