Changeset 9183
- Timestamp:
- 04/09/08 15:55:08 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Class-Component/trunk/t/16_myclass_autoload_plugin.t
r9181 r9183 5 5 use lib 't'; 6 6 7 use Test::More tests => 6;7 use Test::More tests => 24; 8 8 9 9 use MyClass; … … 13 13 $c->load_components('AutoloadPlugin'); 14 14 is $c->call('hello'), undef; 15 is $c->run_hook('hello'), undef; 16 15 17 $c->autoload_plugins({ module => 'Hello'}); # hashref. 16 18 is $c->call('hello'), 'hello'; 19 is $c->run_hook('hello')->[0], 'hook hello'; 20 is scalar(@{ $c->run_hook('hello') }), 1; 21 22 $c->autoload_plugins({ module => 'Hello'}); # hashref. 23 is $c->call('hello'), 'hello'; 24 is $c->run_hook('hello')->[0], 'hook hello'; 25 is scalar(@{ $c->run_hook('hello') }), 1; 17 26 }; 18 27 … … 21 30 $c->load_components('AutoloadPlugin'); 22 31 is $c->call('hello'), undef; 32 is $c->run_hook('hello'), undef; 33 23 34 $c->autoload_plugins('Hello'); # simple string 24 35 is $c->call('hello'), 'hello'; 36 is $c->run_hook('hello')->[0], 'hook hello'; 37 is scalar(@{ $c->run_hook('hello') }), 1; 38 39 $c->autoload_plugins('Hello'); # simple string 40 is $c->call('hello'), 'hello'; 41 is $c->run_hook('hello')->[0], 'hook hello'; 42 is scalar(@{ $c->run_hook('hello') }), 1; 25 43 }; 26 44 … … 29 47 $c->load_components('AutoloadPlugin'); 30 48 is $c->call('hello'), undef; 49 is $c->run_hook('hello'), undef; 50 31 51 $c->autoload_plugins('+MyClass::Plugin::Hello'); # full path 32 52 is $c->call('hello'), 'hello'; 53 is $c->run_hook('hello')->[0], 'hook hello'; 54 is scalar(@{ $c->run_hook('hello') }), 1; 55 56 $c->autoload_plugins('+MyClass::Plugin::Hello'); # full path 57 is $c->call('hello'), 'hello'; 58 is $c->run_hook('hello')->[0], 'hook hello'; 59 is scalar(@{ $c->run_hook('hello') }), 1; 33 60 }; 34 61
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)