Created
September 3, 2009 15:46
-
-
Save perlDreamer/180364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:syntax=perl | |
#------------------------------------------------------------------- | |
# WebGUI is Copyright 2001-2008 Plain Black Corporation. | |
#------------------------------------------------------------------- | |
# Please read the legal notices (docs/legal.txt) and the license | |
# (docs/license.txt) that came with this distribution before using | |
# this software. | |
#------------------------------------------------------------------ | |
# http://www.plainblack.com info@plainblack.com | |
#------------------------------------------------------------------ | |
# Write a little about what this script tests. | |
# | |
# This tests WebGUI::Asset::Sku::Product | |
use FindBin; | |
use strict; | |
use lib "$FindBin::Bin/lib"; | |
use Test::More qw/no_plan/; | |
use Test::Deep; | |
use WebGUI::Test; # Must use this before any other WebGUI modules | |
use WebGUI::Session; | |
use WebGUI::Asset; | |
use WebGUI::Asset::Wobject::WikiMaster; | |
use WebGUI::Asset::WikiPage; | |
#---------------------------------------------------------------------------- | |
# Init | |
my $session = WebGUI::Test->session; | |
#---------------------------------------------------------------------------- | |
# Tests | |
#---------------------------------------------------------------------------- | |
# put your tests here | |
my $home = WebGUI::Asset->getDefault($session); | |
my $properties = { | |
className => 'WebGUI::Asset::WikiPage', | |
}; | |
my $index = 0; | |
my $versionTag = WebGUI::VersionTag->getWorking($session); | |
my $wiki = $home->addChild({ | |
className => 'WebGUI::Asset::Wobject::WikiMaster', | |
title => 'Test wiki', | |
url => 'testwiki', | |
templateId => 'WikiFrontTmpl000000001', | |
pageTemplateId => 'WikiPageTmpl0000000001', | |
pageEditTemplateId => 'WikiPageEditTmpl000001', | |
byKeywordTemplateId => 'WikiKeyword00000000001', | |
}); | |
while ($index++ < 150) { | |
$properties->{title} = "Article #$index"; | |
$properties->{url} = "article$index"; | |
$properties->{keywords} = "test"; | |
$wiki->addChild($properties, undef, undef, {skipAutoCommitWorkflows => 1, }); | |
} | |
$versionTag->commit; | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment