Skip to content

Commit

Permalink
[#481] [#632] Modified test plugins to more closely approximate their…
Browse files Browse the repository at this point in the history
… initialization with that of actual plugins. Also added non-enclosed YAML plugin to test for its *lack* of loading
  • Loading branch information
jayallen committed Dec 21, 2010
1 parent b0b73e0 commit 70c13d8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
8 changes: 5 additions & 3 deletions t/plugins/Awesome/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Awesome
key: awesome
id: awesome
name: "Oh Awesome"
key: Awesome
id: Awesome
description: 'A plugin to test plugin initialization and data object extension'
version: '1.0'

object_types:
awesome: MT::Awesome
Expand Down
6 changes: 3 additions & 3 deletions t/plugins/Rebless/config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: 'ReblessMe-Plugin'
name: 'Rebless Me'
name: 'Rebless Me'
id: 'ReblessMe'
key: 'ReblessMe'
plugin_class: 'Rebless::Plugin'

16 changes: 15 additions & 1 deletion t/plugins/stray.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,23 @@
#
# $Id$

package __FILE__;
package MT::Plugin::NakedPerl;

use strict;
use warnings;
use base 'MT::Plugin';
our $VERSION = '0.1';

my $plugin;
MT->add_plugin($plugin = __PACKAGE__->new({
name => "Naked perl-initialized test",
version => $VERSION,
description => "Bad legacy plugin without a plugin envelope. No cookie",
author_name => "Whatnot Smith",
key => 'NakedPerl',
id => 'NakedPerl',
}));


use MT::Template::Context;
MT::Template::Context->add_tag( EzPlug => sub {1} );
Expand Down
4 changes: 4 additions & 0 deletions t/plugins/stray.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: The Stray Camel
key: StrayCamel
id: StrayCamel
description: A YAML initialized plugin but no plugin envelope
2 changes: 1 addition & 1 deletion t/plugins/subfoldered/subfoldered.pl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/perl
package MT::Plugin::Subfoldered;

use strict;
use warnings;
use base 'MT::Plugin';
our $VERSION = '0.1';
use MT;

my $plugin;
MT->add_plugin($plugin = __PACKAGE__->new({
Expand Down

0 comments on commit 70c13d8

Please sign in to comment.