Merge branch 'master' into 8-merge
Conflicts: docs/gotcha.txt lib/WebGUI.pm lib/WebGUI/Asset.pm lib/WebGUI/Asset/File/GalleryFile/Photo.pm lib/WebGUI/Asset/Post.pm lib/WebGUI/Asset/Story.pm lib/WebGUI/Asset/Template.pm lib/WebGUI/Asset/Wobject/Calendar.pm lib/WebGUI/Asset/Wobject/GalleryAlbum.pm lib/WebGUI/Asset/Wobject/Navigation.pm lib/WebGUI/AssetLineage.pm lib/WebGUI/AssetTrash.pm lib/WebGUI/Config.pm lib/WebGUI/Form/Template.pm lib/WebGUI/Group.pm lib/WebGUI/Inbox.pm lib/WebGUI/Workflow/Activity/DeleteExpiredSessions.pm lib/WebGUI/Workflow/Activity/TrashExpiredEvents.pm sbin/testEnvironment.pl t/AdSpace.t t/AdSpace/Ad.t t/Asset/Asset.t t/Asset/AssetExportHtml.t t/Asset/AssetLineage.t t/Asset/EMSSubmissionForm.t t/Asset/Event.t t/Asset/File/GalleryFile/Photo/00base.t t/Asset/File/GalleryFile/Photo/comment.t t/Asset/File/GalleryFile/Photo/download.t t/Asset/File/GalleryFile/Photo/edit.t t/Asset/File/GalleryFile/Photo/exif.t t/Asset/File/GalleryFile/Photo/makeResolutions.t t/Asset/File/GalleryFile/Photo/makeShortcut.t t/Asset/File/Image/setfile.t t/Asset/File/setfile.t t/Asset/Post.t t/Asset/Post/Thread/getAdjacentThread.t t/Asset/Sku.t t/Asset/Sku/ProductCollateral.t t/Asset/Story.t t/Asset/Template.t t/Asset/Template/HTMLTemplateExpr.t t/Asset/Wobject/Gallery/00base.t t/Asset/Wobject/GalleryAlbum/00base.t t/Asset/Wobject/GalleryAlbum/ajax.t t/Asset/Wobject/GalleryAlbum/delete.t t/Asset/Wobject/Matrix.t t/Asset/Wobject/StoryArchive.t t/Asset/Wobject/Survey/ExpressionEngine.t t/Asset/Wobject/Survey/Reports.t t/AssetAspect/RssFeed.t t/Auth/mech.t t/Config.t t/Group.t t/Help/isa.t t/International.t t/Mail/Send.t t/Operation/AdSpace.t t/Operation/Auth.t t/Pluggable.t t/Session.t t/Session/DateTime.t t/Session/ErrorHandler.t t/Session/Scratch.t t/Session/Stow.t t/Shop/Cart.t t/Shop/Pay.t t/Shop/PayDriver/ITransact.t t/Shop/PayDriver/PayPalStd.t t/Shop/Ship.t t/Shop/ShipDriver.t t/Shop/TaxDriver/EU.t t/Shop/TaxDriver/Generic.t t/Shop/Transaction.t t/Shop/Vendor.t t/VersionTag.t t/Workflow/Activity/ArchiveOldStories.t t/Workflow/Activity/ExpireIncompleteSurveyResponses.t t/lib/WebGUI/Test.pm
This commit is contained in:
commit
babfa74209
238 changed files with 4557 additions and 1287 deletions
|
|
@ -19,9 +19,9 @@ use WebGUI::Session;
|
|||
|
||||
use Test::More tests => 90; # increment this value for each test you create
|
||||
|
||||
local @INC = @INC;
|
||||
unshift @INC, File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'Session-DateTime', 'lib' );
|
||||
|
||||
installBadLocale();
|
||||
WebGUI::Test->addToCleanup(sub { unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n BadLocale.pm/); });
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
my $dt = $session->datetime;
|
||||
|
|
@ -301,3 +301,11 @@ $session->user({user => $dude});
|
|||
is($dt->epochToHuman($wgbday), '8/16/2001 9:00 pm', 'epochToHuman: constructs a default locale if the language does not provide one.');
|
||||
$session->user({userId => 1});
|
||||
|
||||
sub installBadLocale {
|
||||
copy(
|
||||
WebGUI::Test->getTestCollateralPath('BadLocale.pm'),
|
||||
File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n BadLocale.pm/)
|
||||
);
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -115,4 +115,3 @@ WebGUI::Test->interceptLogging( sub {
|
|||
};
|
||||
is $log_data->{fatal}, 'Bad things are happenning', 'fatal: logger called correctly';
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ my $session = WebGUI::Test->session;
|
|||
####################################################
|
||||
|
||||
my $origToolbar = $session->user->profileField('toolbar');
|
||||
WebGUI::Test->addToCleanup(sub { $session->user->profileField('toolbar', $origToolbar); },);
|
||||
my $toolbars = $session->url->extras('toolbar/');
|
||||
|
||||
my $request = $session->request;
|
||||
|
|
@ -167,12 +168,6 @@ sub linkAndText {
|
|||
return @parsedParams;
|
||||
}
|
||||
|
||||
my $icon = $session->icon->drag();
|
||||
|
||||
END {
|
||||
$session->user->profileField('toolbar', $origToolbar);
|
||||
}
|
||||
|
||||
sub fetchTestSet {
|
||||
return (
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ my $session = WebGUI::Test->session;
|
|||
my $privilege = $session->privilege;
|
||||
|
||||
my ($versionTag, $userTemplate) = setup_assets($session);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
isa_ok($privilege, 'WebGUI::Session::Privilege', 'session has correct object type');
|
||||
|
||||
|
|
@ -135,9 +136,4 @@ sub setup_assets {
|
|||
return ($versionTag, $userTemplate);
|
||||
}
|
||||
|
||||
|
||||
END {
|
||||
if (defined $versionTag and ref $versionTag eq 'WebGUI::VersionTag') {
|
||||
$versionTag->rollback;
|
||||
}
|
||||
}
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ is($scratch->set('','value'), undef, 'set returns undef unless it gets a name ev
|
|||
|
||||
my @sessionBank = map { WebGUI::Session->open(WebGUI::Test->file) } 0..3;
|
||||
|
||||
WebGUI::Test->addToCleanup(@sessionBank);
|
||||
|
||||
##Set variables to be deleted by name
|
||||
foreach my $i (0..3) {
|
||||
$sessionBank[$i]->scratch->set('deletableName', $i);
|
||||
|
|
@ -127,14 +129,4 @@ $scratch->setLanguageOverride('English');
|
|||
$scratch->setLanguageOverride();
|
||||
is($scratch->getLanguageOverride, 'English', 'A empty string is falsely recognised as a language');
|
||||
|
||||
END {
|
||||
$session->scratch->deleteAll;
|
||||
foreach my $wgSess ($newSession, @sessionBank) {
|
||||
if (defined $wgSess and ref $wgSess eq 'WebGUI::Session') {
|
||||
note "Closing session";
|
||||
$wgSess->scratch->deleteAll;
|
||||
$wgSess->var->end;
|
||||
$wgSess->close;
|
||||
}
|
||||
}
|
||||
}
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -80,3 +80,4 @@ is( $session->stow->get( 'possibilities', { noclone => 1 } ), $arr,
|
|||
"With noclone returns same reference"
|
||||
);
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ is($macroOutput, 1, 'generateAdditionalHeadTags: process a macro');
|
|||
####################################################
|
||||
|
||||
my ($versionTag, $templates, $article, $snippet) = setup_assets($session);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
$style->sent(0);
|
||||
is($style->sent, 0, 'process: setup sent to 0');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue