Skip to content

Commit

Permalink
Item11135: use Foswiki::Func API rather
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@13399 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Dec 12, 2011
1 parent 5b16ec1 commit c6bc3dc
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions UnitTestContrib/test/unit/InitFormTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,17 @@ sub set_up {
my $this = shift;
$this->SUPER::set_up();

my $query = new Unit::Request();
$this->{session} = new Foswiki( undef, $query );
$this->{request} = $query;
$this->{response} = new Unit::Response();
$user = $this->{session}->{user};

$Foswiki::Plugins::SESSION->finish();
$this->{request} = Unit::Request->new();
$Foswiki::Plugins::SESSION =
Foswiki->new( $Foswiki::cfg{AdminUserLogin}, $this->{request} );
$this->{response} = Unit::Response->new();
Foswiki::Func::createWeb($testweb);
$Foswiki::Plugins::SESSION->finish();
$this->{session} = Foswiki->new( undef, $this->{request} );
$Foswiki::Plugins::SESSION = $this->{session};
$aurl = $this->{session}->getPubUrl( 1, $testweb, $testform );
$surl = $this->{session}->getScriptUrl(1);

my $webObject = Foswiki::Meta->new( $this->{session}, $testweb );
$webObject->populateNewWeb();

$Foswiki::Plugins::SESSION = $this->{session};
Foswiki::Func::saveTopicText( $testweb, $testtopic1, $testtext1, 1, 1 );
Foswiki::Func::saveTopicText( $testweb, $testtopic2, $testtext2, 1, 1 );
Foswiki::Func::saveTopicText( $testweb, $testtopic3, $testtext3, 1, 1 );
Expand Down

0 comments on commit c6bc3dc

Please sign in to comment.