Changeset 14058


Ignore:
Timestamp:
02/22/12 12:50:13 (5 hours ago)
Author:
PaulHarvey
Message:

Item11366: Avoid using Foswiki::Address in test

File:
1 edited

Legend:

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

    r14055 r14058  
    17431743    my $part; 
    17441744 
    1745     require Foswiki::Address; 
    17461745    require HTML::Entities; 
    17471746    print "[[$linktext]]\n\t$html\n" if TRACE; 
     
    17651764        $expectedAddress = "$this->{test_web}.$this->{test_topic}"; 
    17661765    } 
    1767     $addrObj = Foswiki::Address->new( 
    1768         string => $address, 
    1769         web    => $this->{test_web}, 
    1770         topic  => $this->{test_topic}, 
    1771         isA    => 'topic' 
    1772     ); 
    1773     $expectedAddrObj = Foswiki::Address->new( 
    1774         string => $expectedAddress, 
    1775         web    => $this->{test_web}, 
    1776         topic  => $this->{test_topic}, 
    1777         isA    => 'topic' 
    1778     ); 
     1766    my ( $actualWeb, $actualTopic ) = 
     1767      Foswiki::Func::normalizeWebTopicName( $this->{test_web}, $address ); 
     1768    my ( $expectedWeb, $expectedTopic ) = 
     1769      Foswiki::Func::normalizeWebTopicName( $this->{test_web}, 
     1770        $expectedAddress ); 
    17791771    print "\tfrag: " 
    17801772      . ( defined $fragment ? $fragment : 'undef' ) 
     
    17841776      . ( defined $address ? $address : 'undef' ) . "\n" 
    17851777      if TRACE; 
    1786     $this->assert_str_equals( $expectedAddrObj->stringify(), 
    1787         $addrObj->stringify(), "address mismatch checking [[$linktext]]" ); 
     1778    $this->assert_str_equals( "$expectedWeb.$expectedTopic", 
     1779        "$actualWeb.$actualTopic", "address mismatch checking [[$linktext]]" ); 
    17881780    $this->assert_deep_equals( $expected->{query}, $query, 
    17891781        "query mismatch checking [[$linktext]]" ); 
Note: See TracChangeset for help on using the changeset viewer.