Skip to content

Commit

Permalink
Item11135: TwistyPlugin Foswiki::Meta purge
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@13953 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Feb 12, 2012
1 parent ccaaa5e commit 32b0827
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions TwistyPlugin/test/unit/TwistyPlugin/TwistyPluginTests.pm
Expand Up @@ -5,10 +5,10 @@ use warnings;

# tests for basic formatting

use FoswikiFnTestCase;
use FoswikiFnTestCase();
our @ISA = qw( FoswikiFnTestCase );

use Foswiki;
use Foswiki();
use Error qw( :try );
my $TEST_WEB_NAME = 'TemporaryTwistyFormattingTestWeb';
my %mangledIDs;
Expand Down Expand Up @@ -36,7 +36,7 @@ sub do_test {
my $session = $this->{session};
my $webName = $web || $this->{test_web};
my $topicName = $topic || $this->{test_topic};
my $actin = $actual;
my $actin = $actual;

$actual =
Foswiki::Func::expandCommonVariables( $actual, $topicName, $webName );
Expand Down Expand Up @@ -301,8 +301,8 @@ sub test_twistyInSubWeb {
$this->{session} = Foswiki->new();

my $testWebSubWebPath = $this->{test_web} . '/SubWeb';
my $webObject = Foswiki::Meta->new( $this->{session}, $testWebSubWebPath );
$webObject->populateNewWeb();
my $webObject = $this->populateNewWeb($testWebSubWebPath);
$webObject->finish();
my $testTopic = 'TwistyTestTopic';
my $source = <<'SOURCE';
%TWISTY{
Expand All @@ -315,11 +315,12 @@ my twisty content
%ENDTWISTY%
SOURCE

my $topicObject =
Foswiki::Meta->new( $this->{session}, $testWebSubWebPath, $testTopic,
$source );
my ($topicObject) =
Foswiki::Func::readTopic( $testWebSubWebPath, $testTopic );
$topicObject->text($source);

$topicObject->save();
$topicObject->finish();

my $expected = <<'EXPECTED';
<span class="twistyPlugin foswikiMakeVisible"><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingsubwebSubWebTwistyTestTopic1show" style="display:none" class="twistyRememberSetting twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><span class="foswikiLinkLabel foswikiUnvisited">Show...</span></a></span><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingsubwebSubWebTwistyTestTopic1hide" style="display:none" class="twistyRememberSetting twistyTrigger foswikiUnvisited twistyInited"><a href="#" class=""><span class="foswikiLinkLabel foswikiUnvisited">Hide</span></a></span></span><span class="twistyPlugin"><span id="twistyIdTemporaryTwistyFormattingTestWebTwistyFormattingsubwebSubWebTwistyTestTopic1toggle" style="" class="twistyRememberSetting twistyContent twistyInited">
Expand Down

0 comments on commit 32b0827

Please sign in to comment.