From: Yousef H. Alhashemi Date: Tue, 11 Aug 2009 13:47:18 +0000 (+0000) Subject: Moved end() from Catalyst::Plugin::Test::Plugin to TestApp::Controller::Root. Fixed... X-Git-Tag: 5.80013~12^2~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a0a66cb803a6ba6c0920c487e9c5d7fa148b7ec3 Moved end() from Catalyst::Plugin::Test::Plugin to TestApp::Controller::Root. Fixed all the tests that rely on end(). --- diff --git a/t/aggregate/live_component_controller_action_auto.t b/t/aggregate/live_component_controller_action_auto.t index bf566dc..bb34e13 100644 --- a/t/aggregate/live_component_controller_action_auto.t +++ b/t/aggregate/live_component_controller_action_auto.t @@ -35,7 +35,7 @@ sub run_tests { TestApp::Controller::Action::Auto->begin TestApp::Controller::Action::Auto->auto TestApp::Controller::Action::Auto->one - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -52,7 +52,7 @@ sub run_tests { TestApp::Controller::Action::Auto->begin TestApp::Controller::Action::Auto->auto TestApp::Controller::Action::Auto->default - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -70,7 +70,7 @@ sub run_tests { TestApp::Controller::Action::Auto->auto TestApp::Controller::Action::Auto::Deep->auto TestApp::Controller::Action::Auto::Deep->one - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -88,7 +88,7 @@ sub run_tests { TestApp::Controller::Action::Auto->auto TestApp::Controller::Action::Auto::Deep->auto TestApp::Controller::Action::Auto::Deep->default - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_begin.t b/t/aggregate/live_component_controller_action_begin.t index 49b3163..e5b2e0f 100644 --- a/t/aggregate/live_component_controller_action_begin.t +++ b/t/aggregate/live_component_controller_action_begin.t @@ -30,7 +30,7 @@ sub run_tests { TestApp::Controller::Action::Begin->begin TestApp::Controller::Action::Begin->default TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_chained.t b/t/aggregate/live_component_controller_action_chained.t index 615289c..3784fe6 100644 --- a/t/aggregate/live_component_controller_action_chained.t +++ b/t/aggregate/live_component_controller_action_chained.t @@ -815,7 +815,7 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action::Chained::Root->rootsub TestApp::Controller::Action::Chained::Root->endpointsub - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_default.t b/t/aggregate/live_component_controller_action_default.t index 935a326..51940d4 100644 --- a/t/aggregate/live_component_controller_action_default.t +++ b/t/aggregate/live_component_controller_action_default.t @@ -29,7 +29,7 @@ sub run_tests { TestApp::Controller::Action::Default->begin TestApp::Controller::Action::Default->default TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -76,7 +76,7 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action->begin TestApp::Controller::Action->default - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_detach.t b/t/aggregate/live_component_controller_action_detach.t index 5905596..2f43a53 100644 --- a/t/aggregate/live_component_controller_action_detach.t +++ b/t/aggregate/live_component_controller_action_detach.t @@ -30,7 +30,7 @@ sub run_tests { TestApp::Controller::Action::Detach->one TestApp::Controller::Action::Detach->two TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -57,7 +57,7 @@ sub run_tests { TestApp::Controller::Action::Detach->path TestApp::Controller::Action::Detach->two TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_forward.t b/t/aggregate/live_component_controller_action_forward.t index 3000398..3d838b8 100644 --- a/t/aggregate/live_component_controller_action_forward.t +++ b/t/aggregate/live_component_controller_action_forward.t @@ -33,7 +33,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -81,7 +81,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -156,7 +156,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -191,7 +191,7 @@ sub run_tests { TestApp::Controller::Action::Forward->four TestApp::Controller::Action::Forward->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_go.t b/t/aggregate/live_component_controller_action_go.t index 9966a94..41b09b6 100644 --- a/t/aggregate/live_component_controller_action_go.t +++ b/t/aggregate/live_component_controller_action_go.t @@ -43,7 +43,7 @@ sub run_tests { TestApp::Controller::Action::Go->four TestApp::Controller::Action::Go->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -74,7 +74,7 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action::Go->go_die TestApp::Controller::Action::Go->args - TestApp->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -165,7 +165,7 @@ sub run_tests { TestApp::Controller::Action::Go->four TestApp::Controller::Action::Go->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -200,7 +200,7 @@ sub run_tests { TestApp::Controller::Action::Go->four TestApp::Controller::Action::Go->five TestApp::View::Dump::Request->process - TestApp->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; diff --git a/t/aggregate/live_component_controller_action_index.t b/t/aggregate/live_component_controller_action_index.t index 99e9435..7cd24a9 100644 --- a/t/aggregate/live_component_controller_action_index.t +++ b/t/aggregate/live_component_controller_action_index.t @@ -27,8 +27,8 @@ sub run_tests { # test root index { my @expected = qw[ - TestApp->index - TestApp->end + TestApp::Controller::Root->index + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -45,7 +45,7 @@ sub run_tests { { my @expected = qw[ TestApp::Controller::Index->index - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -66,7 +66,7 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action::Index->begin TestApp::Controller::Action::Index->index - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); @@ -87,7 +87,7 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action::Index->begin TestApp::Controller::Action::Index->default - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/aggregate/live_component_controller_action_visit.t b/t/aggregate/live_component_controller_action_visit.t index 468496b..4bd246d 100644 --- a/t/aggregate/live_component_controller_action_visit.t +++ b/t/aggregate/live_component_controller_action_visit.t @@ -42,11 +42,11 @@ sub run_tests { TestApp::Controller::Action::Visit->four TestApp::Controller::Action::Visit->five TestApp::View::Dump::Request->process - TestApp->end - TestApp->end - TestApp->end - TestApp->end - TestApp->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -76,8 +76,8 @@ sub run_tests { my @expected = qw[ TestApp::Controller::Action::Visit->visit_die TestApp::Controller::Action::Visit->args - TestApp->end - TestApp->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -166,12 +166,12 @@ sub run_tests { TestApp::Controller::Action::Visit->four TestApp::Controller::Action::Visit->five TestApp::View::Dump::Request->process - TestApp->end - TestApp->end - TestApp->end - TestApp->end - TestApp->end - TestApp->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -206,12 +206,12 @@ sub run_tests { TestApp::Controller::Action::Visit->four TestApp::Controller::Action::Visit->five TestApp::View::Dump::Request->process - TestApp->end - TestApp->end - TestApp->end - TestApp->end - TestApp->end - TestApp->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end + TestApp::Controller::Root->end ]; @expected = map { /Action/ ? (_begin($_), $_) : ($_) } @expected; @@ -266,7 +266,7 @@ sub run_tests { TestApp::Controller::Action::Chained->foo TestApp::Controller::Action::Chained::Foo->spoon TestApp::Controller::Action::Chained->end - TestApp->end + TestApp::Controller::Root->end ]; my $expected = join( ", ", @expected ); diff --git a/t/lib/Catalyst/Plugin/Test/Plugin.pm b/t/lib/Catalyst/Plugin/Test/Plugin.pm index 1d39c7b..16f3f63 100644 --- a/t/lib/Catalyst/Plugin/Test/Plugin.pm +++ b/t/lib/Catalyst/Plugin/Test/Plugin.pm @@ -32,8 +32,4 @@ sub prepare_action { $c->next::method(@_); } -sub end : Private { - my ($self,$c) = @_; -} - 1; diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm index afdf6db..5aa03dc 100644 --- a/t/lib/TestApp/Controller/Root.pm +++ b/t/lib/TestApp/Controller/Root.pm @@ -48,4 +48,8 @@ sub recursion_test : Local { $c->forward( 'recursion_test' ); } +sub end : Private { + my ($self,$c) = @_; +} + 1;