[Catalyst-commits] r7942 - in trunk/Catalyst-Engine-Wx/t: .
lib/TestApp/Controller lib/TestAppWx
eriam at dev.catalyst.perl.org
eriam at dev.catalyst.perl.org
Mon Jun 23 20:44:11 BST 2008
Author: eriam
Date: 2008-06-23 20:44:11 +0100 (Mon, 23 Jun 2008)
New Revision: 7942
Removed:
trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/shutdown.pm
trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/textctrl.pm
Modified:
trunk/Catalyst-Engine-Wx/t/4_forward.t
trunk/Catalyst-Engine-Wx/t/lib/TestApp/Controller/Root.pm
trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/default.pm
trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/forwarded_view.pm
Log:
Tests are now conforming to the new mechanism to pass the initial path
Modified: trunk/Catalyst-Engine-Wx/t/4_forward.t
===================================================================
--- trunk/Catalyst-Engine-Wx/t/4_forward.t 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/4_forward.t 2008-06-23 19:44:11 UTC (rev 7942)
@@ -29,8 +29,11 @@
TestApp->setup;
-TestApp->run({
- bootstrap => '/forward',
-});
+TestApp->run('forward');
+
+#TestApp->run({
+# bootstrap => '/forward',
+#});
+
1;
Modified: trunk/Catalyst-Engine-Wx/t/lib/TestApp/Controller/Root.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/t/lib/TestApp/Controller/Root.pm 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/lib/TestApp/Controller/Root.pm 2008-06-23 19:44:11 UTC (rev 7942)
@@ -31,14 +31,14 @@
}
- $c->stash->{class} = 'shutdown';
+ $c->stash->{template} = 'shutdown';
}
sub shutdown : Local {
my ( $self, $c ) = @_;
-
-# $c->stash->{class} = 'shutdown';
+ $c->log->info('controller shut down ..');
+
}
sub forward : Local {
Modified: trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/default.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/default.pm 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/default.pm 2008-06-23 19:44:11 UTC (rev 7942)
@@ -6,7 +6,7 @@
use Test::More;
use Wx ':everything';
-use Catalyst::Engine::Wx::Event qw(CAT_EVT);
+use Catalyst::Engine::Wx::Event qw(CAT_EVT CAT_EVT_QUIT);
use base 'Wx::Frame';
@@ -15,13 +15,39 @@
my $self = $class->SUPER::new( undef, -1, 'Test', [0, 0], [475,300] );
- $self->Show(0);
+ $self->Show(1);
ok (ref($self) eq 'TestAppWx::default', 'TestAppWx::default');
- CAT_EVT( $self, '/textctrl' );
+ CAT_EVT( $self, 'textctrl' );
return 1;
}
+sub textctrl {
+ my ($self, $catalyst, $c ) = @_;
+
+ my $testctrl = Wx::TextCtrl->new( $c->stash->{_parent}, -1, 'Test', [105,15],[140,30] );
+
+ ok (ref($self) eq 'TestAppWx::default', 'TestAppWx::default');
+
+ $c->log->info('textctrl .. ');
+
+ CAT_EVT( $self, '/event_with_params', { scalar => 'data', array => ['test', 'of', 'array'] } );
+
+ return 1;
+}
+
+
+
+sub shutdown {
+ my ($self, $catalyst, $c ) = @_;
+
+ $c->log->info('Shutting down .. ');
+
+ CAT_EVT_QUIT;
+
+ return;
+}
+
1;
Modified: trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/forwarded_view.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/forwarded_view.pm 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/forwarded_view.pm 2008-06-23 19:44:11 UTC (rev 7942)
@@ -6,20 +6,31 @@
use Test::More;
use Wx ':everything';
-use Catalyst::Engine::Wx::Event qw(CAT_EVT_BUTTON CAT_EVT_CLOSE CAT_EVT);
+use Catalyst::Engine::Wx::Event qw(CAT_EVT_BUTTON CAT_EVT_CLOSE CAT_EVT CAT_EVT_QUIT);
use base 'Wx::Frame';
sub new {
my ($class, $catalyst, $c ) = @_;
- my $self = $class->SUPER::new( $c->stash->{_parent}, -1, 'Test', [105,15],[140,30] );
+ my $self = $class->SUPER::new( undef, -1, 'Test', [105,15],[140,30] );
ok (ref($self) eq 'TestAppWx::forwarded_view', 'TestAppWx::forwarded_view');
- CAT_EVT( $c->stash->{_parent}, '/shutdown' );
+ CAT_EVT( $self, 'shutdown' );
return 1;
}
+
+sub shutdown {
+ my ($self, $catalyst, $c ) = @_;
+
+ $c->log->info('Shutting down .. ');
+
+ CAT_EVT_QUIT;
+
+ return;
+}
+
1;
Deleted: trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/shutdown.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/shutdown.pm 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/shutdown.pm 2008-06-23 19:44:11 UTC (rev 7942)
@@ -1,23 +0,0 @@
-package # Hide from pause
- TestAppWx::shutdown;
-
-use strict;
-use warnings;
-
-use Test::More;
-use Wx ':everything';
-use Catalyst::Engine::Wx::Event qw(CAT_EVT_QUIT);
-
-use base 'Catalyst::View::Wx';
-
-sub new {
- my ($class, $catalyst, $c ) = @_;
-
- my $self = $c->stash->{_parent};
-
- CAT_EVT_QUIT;
-
- return;
-}
-
-1;
Deleted: trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/textctrl.pm
===================================================================
--- trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/textctrl.pm 2008-06-23 19:43:02 UTC (rev 7941)
+++ trunk/Catalyst-Engine-Wx/t/lib/TestAppWx/textctrl.pm 2008-06-23 19:44:11 UTC (rev 7942)
@@ -1,25 +0,0 @@
-package # Hide from pause
- TestAppWx::textctrl;
-
-use strict;
-use warnings;
-
-use Test::More;
-use Wx ':everything';
-use Catalyst::Engine::Wx::Event qw(CAT_EVT_BUTTON CAT_EVT_CLOSE CAT_EVT);
-
-use base 'Wx::TextCtrl';
-
-sub new {
- my ($class, $catalyst, $c ) = @_;
-
- my $self = $class->SUPER::new( $c->stash->{_parent}, -1, 'Test', [105,15],[140,30] );
-
- ok (ref($self) eq 'TestAppWx::textctrl', 'TestAppWx::textctrl');
-
- CAT_EVT( $c->stash->{_parent}, '/event_with_params', { scalar => 'data', array => ['test', 'of', 'array'] } );
-
- return 1;
-}
-
-1;
More information about the Catalyst-commits
mailing list