Ignore:
Timestamp:
01/27/12 06:20:36 (4 months ago)
Author:
PaulHarvey
Message:

Item11456: Remove Foswiki::Address from Fn_SEARCH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/UnitTestContrib/test/unit/Fn_SEARCH.pm

    r13835 r13843  
    2121our @ISA = qw( FoswikiFnTestCase ); 
    2222 
     23use Assert; 
    2324use Foswiki(); 
    24 use Error qw( :try ); 
    25 use Assert; 
    26 use English qw( -no_match_vars ); 
     25use Foswiki::Func(); 
    2726use Foswiki::Search(); 
    2827use Foswiki::Search::InfoCache(); 
     28use English qw( -no_match_vars ); 
     29use Error qw( :try ); 
    2930 
    3031use File::Spec qw(case_tolerant) 
     
    59205921    $this->createNewFoswikiSession( $Foswiki::cfg{AdminUserLogin}, $query ); 
    59215922    $this->assert_str_equals( $this->{test_web}, $this->{session}->{webName} ); 
    5922     require Foswiki::Address; 
    59235923    while ( my ( $fwaddress, $metatext ) = each %topics ) { 
    5924         my $addrObj = Foswiki::Address->new( string => $fwaddress ); 
     5924        my ( $web, $topic ) = 
     5925          Foswiki::Func::normalizeWebTopicName( '', $fwaddress ); 
    59255926        my $topicObj; 
    59265927 
    5927         if ( not Foswiki::Func::webExists( $addrObj->web() ) ) { 
     5928        if ( not Foswiki::Func::webExists($web) ) { 
    59285929            my @webs; 
    59295930 
    5930             foreach my $part ( @{ $addrObj->webpath() } ) { 
    5931                 my $web; 
     5931            foreach my $part ( split( /\//, $web ) ) { 
     5932                my $w; 
    59325933 
    59335934                push( @webs, $part ); 
    5934                 $web = join( '/', @webs ); 
    5935                 if ( not Foswiki::Func::webExists($web) ) { 
    5936                     Foswiki::Func::createWeb( $web, '_default' ); 
     5935                $w = join( '/', @webs ); 
     5936                if ( not Foswiki::Func::webExists($w) ) { 
     5937                    Foswiki::Func::createWeb( $w, '_default' ); 
    59375938                } 
    59385939            } 
    59395940        } 
    5940         ($topicObj) = 
    5941           Foswiki::Func::readTopic( $addrObj->web(), $addrObj->topic() ); 
     5941        ($topicObj) = Foswiki::Func::readTopic( $web, $topic ); 
    59425942        $topicObj->text($metatext); 
    59435943        $topicObj->save(); 
Note: See TracChangeset for help on using the changeset viewer.