X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestAppCustomContainer%2FNoSugarContainer.pm;h=d345aad0925d47cf183bfbb8a45a3ce935e05598;hb=96c9f5d4c9cebf815970a5ea94b90ad693ebaa93;hp=14f5f3466c4b246fc6d612f50e8240618b4b35ca;hpb=94e35f0004f8ff1be9d44f8f9527c6718044729d;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestAppCustomContainer/NoSugarContainer.pm b/t/lib/TestAppCustomContainer/NoSugarContainer.pm index 14f5f34..d345aad 100644 --- a/t/lib/TestAppCustomContainer/NoSugarContainer.pm +++ b/t/lib/TestAppCustomContainer/NoSugarContainer.pm @@ -8,7 +8,6 @@ extends 'Catalyst::IOC::Container'; sub BUILD { my $self = shift; - warn("Add SingletonLifeCycle to model"); $self->get_sub_container('model')->add_service( Catalyst::IOC::ConstructorInjection->new( name => 'SingletonLifeCycle', @@ -16,13 +15,11 @@ sub BUILD { class => 'TestAppCustomContainer::Model::SingletonLifeCycle', catalyst_component_name => 'TestAppCustomContainer::Model::SingletonLifeCycle', dependencies => { - application_name => depends_on( '/application_name' ), - foo => depends_on('/model/DefaultSetup'), + catalyst_application => depends_on( '/catalyst_application' ), }, ) ); - warn("Add RequestLifeCycle to model"); $self->get_sub_container('model')->add_service( Catalyst::IOC::ConstructorInjection->new( name => 'RequestLifeCycle', @@ -30,14 +27,25 @@ sub BUILD { class => 'TestAppCustomContainer::Model::RequestLifeCycle', catalyst_component_name => 'TestAppCustomContainer::Model::RequestLifeCycle', dependencies => { - application_name => depends_on( '/application_name' ), - # FIXME - this is what is blowing up everything: - # DefaultSetup needs the context. It's not getting it here! - foo => depends_on('/model/DefaultSetup'), + catalyst_application => depends_on( '/catalyst_application' ), }, ) ); +# $self->get_sub_container('model')->add_service( +# Catalyst::IOC::ConstructorInjection->new( +# name => 'DependsOnDefaultSetup', +# class => 'TestAppCustomContainer::Model::DependsOnDefaultSetup', +# catalyst_component_name => 'TestAppCustomContainer::Model::DependsOnDefaultSetup', +# dependencies => { +# catalyst_application => depends_on( '/catalyst_application' ), +# # FIXME - this is what is blowing up everything: +# # DefaultSetup needs the context. It's not getting it here! +# foo => depends_on('/model/DefaultSetup'), +# }, +# ) +# ); + # Broken deps!?! # $self->get_sub_container('model')->add_service( # Catalyst::IOC::BlockInjection->new( @@ -57,7 +65,7 @@ sub BUILD { # lifecycle => 'Singleton', # class => 'TestAppCustomContainer::External::Class', # dependencies => [ -# depends_on( '/application_name' ), +# depends_on( '/catalyst_application' ), # ], # config => $fnar_config, # )