Changeset 1042 for trunk/t/41_deletion.t


Ignore:
Timestamp:
Jun 9, 2007, 2:47:33 PM (14 years ago)
Author:
kake
Message:

Remove dependency on Test::MockObject?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/41_deletion.t

    r785 r1042  
    11use strict;
    2 use Wiki::Toolkit::Formatter::UseMod;
     2use OpenGuides;
    33use OpenGuides::Template;
    44use OpenGuides::Test;
    5 use Test::MockObject;
    65use Test::More tests => 3;
    76
     
    109$config->script_url( "/" );
    1110
    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 ); } );
     11my $guide = OpenGuides->new( config => $config );
     12my $wiki = $guide->wiki;
    1913
    2014my $output = OpenGuides::Template->output(
    21     wiki     => $fake_wiki,
     15    wiki     => $wiki,
    2216    config   => $config,
    2317    template => "node.tt",
     
    2721$config->enable_page_deletion( "y" );
    2822$output = OpenGuides::Template->output(
    29     wiki     => $fake_wiki,
     23    wiki     => $wiki,
    3024    config   => $config,
    3125    template => "node.tt",
     
    3529$config->enable_page_deletion( 1 );
    3630$output = OpenGuides::Template->output(
    37     wiki     => $fake_wiki,
     31    wiki     => $wiki,
    3832    config   => $config,
    3933    template => "node.tt",
Note: See TracChangeset for help on using the changeset viewer.