Changeset 243


Ignore:
Timestamp:
May 4, 2006, 5:03:51 PM (14 years ago)
Author:
nick
Message:

Fix tests so they work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki-toolkit/trunk/t/102_multiple_formatter.t

    r242 r243  
    11use strict;
    2 use CGI::Wiki;
    3 use CGI::Wiki::Store::SQLite;
    4 use CGI::Wiki::Formatter::Default;
    5 use CGI::Wiki::Formatter::Multiple;
     2use Wiki::Toolkit;
     3use Wiki::Toolkit::Setup::SQLite;
     4use Wiki::Toolkit::Store::SQLite;
     5use Wiki::Toolkit::Formatter::Default;
     6use Wiki::Toolkit::Formatter::Multiple;
    67use vars qw( $num_sqlite_tests );
    78BEGIN {
     
    1011use Test::More tests => 1 + $num_sqlite_tests;
    1112
    12 my $default_fmtr = CGI::Wiki::Formatter::Default->new;
     13my $default_fmtr = Wiki::Toolkit::Formatter::Default->new;
    1314my $uc_fmtr = Local::Test::Formatter::UC->new;
    1415my $append_fmtr = Local::Test::Formatter::Append->new;
    1516
    16 my $formatter = CGI::Wiki::Formatter::Multiple->new(
     17my $formatter = Wiki::Toolkit::Formatter::Multiple->new(
    1718    normal   => $default_fmtr,
    1819    uc       => $uc_fmtr,
    1920    _DEFAULT => $append_fmtr,
    2021);
    21 isa_ok( $formatter, "CGI::Wiki::Formatter::Multiple" );
     22isa_ok( $formatter, "Wiki::Toolkit::Formatter::Multiple" );
    2223
    2324eval { require DBD::SQLite };
     
    2829      $num_sqlite_tests unless $run_tests;
    2930
    30     my $store = CGI::Wiki::Store::SQLite->new( dbname => "./t/wiki.db" );
    31     my $wiki = CGI::Wiki->new( store => $store, formatter => $formatter );
    32     isa_ok( $wiki, "CGI::Wiki" );
     31    Wiki::Toolkit::Setup::SQLite::setup("./t/wiki.db");
     32
     33    my $store = Wiki::Toolkit::Store::SQLite->new( dbname => "./t/wiki.db" );
     34    my $wiki = Wiki::Toolkit->new( store => $store, formatter => $formatter );
     35    isa_ok( $wiki, "Wiki::Toolkit" );
    3336
    3437    $wiki->write_node( "Normal Node", "foo bar FooBar", undef,
     
    5457
    5558    # Now test we get a sensible default _DEFAULT.
    56     $formatter = CGI::Wiki::Formatter::Multiple->new( uc => $uc_fmtr );
    57     $wiki = CGI::Wiki->new( store => $store, formatter => $formatter );
     59    $formatter = Wiki::Toolkit::Formatter::Multiple->new( uc => $uc_fmtr );
     60    $wiki = Wiki::Toolkit->new( store => $store, formatter => $formatter );
    5861    my %data4 = $wiki->retrieve_node( "Other Node" );
    5962    my $output4 = $wiki->format( $data4{content}, $data4{metadata} );
Note: See TracChangeset for help on using the changeset viewer.