Ignore:
Timestamp:
01/25/12 10:36:41 (4 months ago)
Author:
PaulHarvey
Message:

Item11431: Don't Foswiki->new/finish

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/CommentPlugin/test/unit/CommentPlugin/CommentPluginTests.pm

    r8843 r13825  
    229229    } 
    230230 
    231     my $session = Foswiki->new( $Foswiki::cfg{DefaultUserLoginName}, $query ); 
     231    $this->createNewFoswikiSession( $Foswiki::cfg{DefaultUserLoginName}, 
     232        $query ); 
    232233    my $text = "Ignore this text"; 
    233234 
    234235    # invoke the save handler 
    235     $this->captureWithKey( save => $this->getUIFn('save'), $session ); 
     236    $this->captureWithKey( save => $this->getUIFn('save'), $this->{session} ); 
    236237 
    237238    $text = Foswiki::Func::readTopicText( $web, $topic ); 
     
    401402    $query->path_info("/$this->{test_web}/$this->{test_topic}"); 
    402403 
    403     my $session = Foswiki->new( $Foswiki::cfg{DefaultUserLoginName}, $query ); 
     404    $this->createNewFoswikiSession( $Foswiki::cfg{DefaultUserLoginName}, 
     405        $query ); 
    404406    my $text = "Ignore this text"; 
    405407 
    406408    # invoke the save handler 
    407     $this->captureWithKey( save => $this->getUIFn('save'), $session ); 
     409    $this->captureWithKey( save => $this->getUIFn('save'), $this->{session} ); 
    408410 
    409411    $text = 
     
    447449    $query->path_info("/$this->{test_web}/$this->{test_topic}"); 
    448450 
    449     my $session = Foswiki->new( $Foswiki::cfg{DefaultUserLoginName}, $query ); 
     451    $this->createNewFoswikiSession( $Foswiki::cfg{DefaultUserLoginName}, 
     452        $query ); 
    450453    my $text = "Ignore this text"; 
    451454 
    452455    # invoke the save handler 
    453     $this->captureWithKey( save => $this->getUIFn('save'), $session ); 
     456    $this->captureWithKey( save => $this->getUIFn('save'), $this->{session} ); 
    454457 
    455458    $text = 
     
    516519    $query->path_info("/$this->{test_web}/$this->{test_topic}"); 
    517520 
    518     my $session = Foswiki->new( $Foswiki::cfg{DefaultUserLoginName}, $query ); 
     521    $this->createNewFoswikiSession( $Foswiki::cfg{DefaultUserLoginName}, 
     522        $query ); 
    519523    my $text = "Ignore this text"; 
    520524 
    521525    # invoke the save handler 
    522     $this->captureWithKey( save => $this->getUIFn('save'), $session ); 
     526    $this->captureWithKey( save => $this->getUIFn('save'), $this->{session} ); 
    523527 
    524528    $text = 
     
    574578    $query->path_info("/$this->{test_web}/$this->{test_topic}"); 
    575579 
    576     my $session = Foswiki->new( $Foswiki::cfg{DefaultUserLoginName}, $query ); 
     580    $this->createNewFoswikiSession( $Foswiki::cfg{DefaultUserLoginName}, 
     581        $query ); 
    577582    my $text = "Ignore this text"; 
    578583 
    579584    # invoke the save handler 
    580     $this->captureWithKey( save => $this->getUIFn('save'), $session ); 
     585    $this->captureWithKey( save => $this->getUIFn('save'), $this->{session} ); 
    581586 
    582587    $text = 
Note: See TracChangeset for help on using the changeset viewer.