Changeset 1042
- Timestamp:
- 06/09/07 14:47:33 (18 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
Build.PL (modified) (1 diff)
-
Changes (modified) (1 diff)
-
PREREQUISITES (modified) (1 diff)
-
t/41_deletion.t (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r1037 r1042 298 298 'POSIX' => 0, 299 299 'Template' => '2.15', # for hash.delete and string.remove vmethods 300 'Test::MockObject' => '0.07', # earlier doesn't use 'mock'301 300 'Time::Piece' => 0, 302 301 'URI::Escape' => 0, -
trunk/Changes
r1037 r1042 9 9 Added extra "edit this page" link next to the node name; if you don't 10 10 want it, add div#title_edit_link {display:none;} to your stylesheet. 11 Removed dependency on Test::MockObject. 11 12 12 13 0.60 13 May 2007 -
trunk/PREREQUISITES
r1028 r1042 41 41 POSIX 42 42 Template 43 Test::MockObject (version 0.07 or later)44 43 Time::Piece 45 44 URI::Escape -
trunk/t/41_deletion.t
r785 r1042 1 1 use strict; 2 use Wiki::Toolkit::Formatter::UseMod;2 use OpenGuides; 3 3 use OpenGuides::Template; 4 4 use OpenGuides::Test; 5 use Test::MockObject;6 5 use Test::More tests => 3; 7 6 … … 10 9 $config->script_url( "/" ); 11 10 12 # White box testing - we know that OpenGuides::Template only actually uses 13 # the node_name_to_node_param method of the formatter component of the wiki 14 # object passed in, and I CBA to faff about with picking out the test DB 15 # info to make a proper wiki object here. 16 my $fake_wiki = Test::MockObject->new; 17 $fake_wiki->mock("formatter", 18 sub { return Wiki::Toolkit::Formatter::UseMod->new( munge_urls => 1 ); } ); 11 my $guide = OpenGuides->new( config => $config ); 12 my $wiki = $guide->wiki; 19 13 20 14 my $output = OpenGuides::Template->output( 21 wiki => $ fake_wiki,15 wiki => $wiki, 22 16 config => $config, 23 17 template => "node.tt", … … 27 21 $config->enable_page_deletion( "y" ); 28 22 $output = OpenGuides::Template->output( 29 wiki => $ fake_wiki,23 wiki => $wiki, 30 24 config => $config, 31 25 template => "node.tt", … … 35 29 $config->enable_page_deletion( 1 ); 36 30 $output = OpenGuides::Template->output( 37 wiki => $ fake_wiki,31 wiki => $wiki, 38 32 config => $config, 39 33 template => "node.tt",
