Debug needs an explicit package name for addToCleanup.
This commit is contained in:
parent
19b6f9de12
commit
82bb59d40e
47 changed files with 99 additions and 99 deletions
|
|
@ -306,7 +306,7 @@ my $session = WebGUI::Test->session;
|
|||
is $revAsset->revisedBy, $session->user->userId, 'revisedBy is current session user';
|
||||
my $count = $session->db->quickScalar('SELECT COUNT(*) from assetData where assetId=?',[$testId2]);
|
||||
is $count, 2, 'two records in the database';
|
||||
addToCleanup($tag);
|
||||
WebGUI::Test->addToCleanup($tag);
|
||||
|
||||
$session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'");
|
||||
$session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'");
|
||||
|
|
|
|||
|
|
@ -59,14 +59,14 @@ $testGroups{'canEdit asset'} = WebGUI::Group->new($session, 'new');
|
|||
$testUsers{'canEdit group user'} = WebGUI::User->new($session, 'new');
|
||||
$testUsers{'canEdit group user'}->addToGroups([$testGroups{'canEdit asset'}->getId]);
|
||||
$testUsers{'canEdit group user'}->username('Edit Group User');
|
||||
addToCleanup($testGroups{'canEdit asset'});
|
||||
WebGUI::Test->addToCleanup($testGroups{'canEdit asset'});
|
||||
|
||||
##A group and user for groupIdEdit
|
||||
$testGroups{'canAdd asset'} = WebGUI::Group->new($session, 'new');
|
||||
$testUsers{'canAdd group user'} = WebGUI::User->new($session, 'new');
|
||||
$testUsers{'canAdd group user'}->addToGroups([$testGroups{'canAdd asset'}->getId]);
|
||||
$testUsers{'canEdit group user'}->username('Can Add Group User');
|
||||
addToCleanup($testGroups{'canAdd asset'}, values %testUsers);
|
||||
WebGUI::Test->addToCleanup($testGroups{'canAdd asset'}, values %testUsers);
|
||||
|
||||
my $canAddMaker = WebGUI::Test::Maker::Permission->new();
|
||||
$canAddMaker->prepare({
|
||||
|
|
@ -99,7 +99,7 @@ $properties = {
|
|||
};
|
||||
|
||||
my $canEditAsset = $rootAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $canEditAsset );
|
||||
WebGUI::Test->addToCleanup( $canEditAsset );
|
||||
$properties = {}; ##Clear out the hash so that it doesn't leak later by accident.
|
||||
|
||||
my $canEditMaker = WebGUI::Test::Maker::Permission->new();
|
||||
|
|
@ -123,7 +123,7 @@ $properties = {
|
|||
|
||||
|
||||
my $canViewAsset = $rootAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $canViewAsset );
|
||||
WebGUI::Test->addToCleanup( $canViewAsset );
|
||||
$properties = {}; ##Clear out the hash so that it doesn't leak later by accident.
|
||||
|
||||
my $canViewMaker = WebGUI::Test::Maker::Permission->new();
|
||||
|
|
@ -363,21 +363,21 @@ my $properties = {
|
|||
};
|
||||
|
||||
my $fixUrlAsset = $defaultAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $fixUrlAsset );
|
||||
WebGUI::Test->addToCleanup( $fixUrlAsset );
|
||||
|
||||
# '1234567890123456789012'
|
||||
$properties->{id} = 'fixUrlAsset00000000013';
|
||||
$properties->{url} = 'fixUrlFolderURL9';
|
||||
|
||||
my $fixUrlAsset2 = $defaultAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $fixUrlAsset2 );
|
||||
WebGUI::Test->addToCleanup( $fixUrlAsset2 );
|
||||
|
||||
# '1234567890123456789012'
|
||||
$properties->{id} = 'fixUrlAsset00000000014';
|
||||
$properties->{url} = 'fixUrlFolderURL00';
|
||||
|
||||
my $fixUrlAsset3 = $defaultAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $fixUrlAsset3 );
|
||||
WebGUI::Test->addToCleanup( $fixUrlAsset3 );
|
||||
|
||||
# '1234567890123456789012'
|
||||
$properties->{id} = 'fixUrlAsset00000000015';
|
||||
|
|
@ -385,7 +385,7 @@ $properties->{url} = 'fixUrlFolderURL100';
|
|||
|
||||
my $fixUrlAsset4 = $defaultAsset->addChild($properties, $properties->{id});
|
||||
is($fixUrlAsset4->get('url'), 'fixurlfolderurl100', 'asset setup correctly for 100->101 test');
|
||||
addToCleanup( $fixUrlAsset4 );
|
||||
WebGUI::Test->addToCleanup( $fixUrlAsset4 );
|
||||
|
||||
delete $properties->{url};
|
||||
# '1234567890123456789012'
|
||||
|
|
@ -393,7 +393,7 @@ $properties->{id} = 'fixUrlAsset00000000016';
|
|||
$properties->{menuTitle} = 'fix url folder url autogenerated';
|
||||
|
||||
my $fixUrlAsset5 = $defaultAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $fixUrlAsset5 );
|
||||
WebGUI::Test->addToCleanup( $fixUrlAsset5 );
|
||||
|
||||
my $properties2 = {
|
||||
# '1234567890123456789012'
|
||||
|
|
@ -404,7 +404,7 @@ my $properties2 = {
|
|||
};
|
||||
|
||||
my $fixTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id});
|
||||
addToCleanup( $fixTitleAsset );
|
||||
WebGUI::Test->addToCleanup( $fixTitleAsset );
|
||||
|
||||
$properties2 = {
|
||||
# '1234567890123456789012'
|
||||
|
|
@ -415,7 +415,7 @@ $properties2 = {
|
|||
};
|
||||
|
||||
my $getTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id});
|
||||
addToCleanup( $getTitleAsset );
|
||||
WebGUI::Test->addToCleanup( $getTitleAsset );
|
||||
|
||||
$session->setting->set('urlExtension', undef);
|
||||
|
||||
|
|
@ -613,9 +613,9 @@ my $node = WebGUI::Asset->getRoot($session);
|
|||
my $product1 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
|
||||
my $product2 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
|
||||
my $product3 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
|
||||
addToCleanup($product1, $product2, $product3);
|
||||
WebGUI::Test->addToCleanup($product1, $product2, $product3);
|
||||
my $product4 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product', status => "pending"}, undef, undef, { skipAutoCommitWorkflows => 1});
|
||||
addToCleanup($product4);
|
||||
WebGUI::Test->addToCleanup($product4);
|
||||
|
||||
my $getAProduct = WebGUI::Asset::Sku::Product->getIsa($session);
|
||||
isa_ok($getAProduct, 'CODE');
|
||||
|
|
@ -666,7 +666,7 @@ $properties = {
|
|||
};
|
||||
|
||||
my $iufpAsset = $defaultAsset->addChild($properties, $properties->{id});
|
||||
addToCleanup( $iufpAsset );
|
||||
WebGUI::Test->addToCleanup( $iufpAsset );
|
||||
$iufpAsset->commit;
|
||||
|
||||
$properties2 = {
|
||||
|
|
@ -678,7 +678,7 @@ $properties2 = {
|
|||
};
|
||||
|
||||
my $iufpAsset2 = $iufpAsset->addChild($properties2, $properties2->{id});
|
||||
addToCleanup( $iufpAsset2 );
|
||||
WebGUI::Test->addToCleanup( $iufpAsset2 );
|
||||
$iufpAsset2->update( { inheritUrlFromParent => 1 } );
|
||||
is $iufpAsset2->inheritUrlFromParent, 1, 'inheritUrlFromParent set';
|
||||
$iufpAsset2->commit;
|
||||
|
|
@ -694,7 +694,7 @@ my $properties2a = {
|
|||
};
|
||||
|
||||
my $iufpAsset2a = $iufpAsset->addChild($properties2a, $properties2a->{id});
|
||||
addToCleanup( $iufpAsset2a );
|
||||
WebGUI::Test->addToCleanup( $iufpAsset2a );
|
||||
$iufpAsset2a->commit;
|
||||
is($iufpAsset2a->url, 'inheriturlfromparent01/inheriturlfromparent2a', '... works when created with the property');
|
||||
|
||||
|
|
@ -716,7 +716,7 @@ my $properties3 = {
|
|||
url => 'inheriturlfromparent03',
|
||||
};
|
||||
my $iufpAsset3 = $iufpAsset2->addChild($properties3, $properties3->{id});
|
||||
addToCleanup( $iufpAsset3 );
|
||||
WebGUI::Test->addToCleanup( $iufpAsset3 );
|
||||
$iufpAsset3->commit;
|
||||
$iufpAsset2->update( { inheritUrlFromParent => 1 } );
|
||||
$iufpAsset2->commit;
|
||||
|
|
@ -741,7 +741,7 @@ my $assetToCommit = $defaultAsset->addChild({
|
|||
status => "pending",
|
||||
tagId => $cloneTag->getId,
|
||||
});
|
||||
addToCleanup($cloneTag);
|
||||
WebGUI::Test->addToCleanup($cloneTag);
|
||||
$cloneTag->commit;
|
||||
is($assetToCommit->get('status'), 'pending', 'cloneFromDb: local asset is still pending');
|
||||
$assetToCommit = $assetToCommit->cloneFromDb;
|
||||
|
|
@ -760,7 +760,7 @@ my $trashedAsset = $defaultAsset->addChild({
|
|||
my $clippedAsset = $defaultAsset->addChild({
|
||||
className => 'WebGUI::Asset::Snippet', title => 'Clippy',
|
||||
});
|
||||
addToCleanup( $trashedAsset, $clippedAsset );
|
||||
WebGUI::Test->addToCleanup( $trashedAsset, $clippedAsset );
|
||||
$trashedAsset = $trashedAsset->cloneFromDb;
|
||||
$clippedAsset = $clippedAsset->cloneFromDb;
|
||||
$trashedAsset->trash;
|
||||
|
|
@ -800,7 +800,7 @@ use HTML::Packer;
|
|||
my $asset = WebGUI::Asset->getImportNode( $session )->addChild({
|
||||
className => 'WebGUI::Asset::Snippet',
|
||||
});
|
||||
addToCleanup( $asset );
|
||||
WebGUI::Test->addToCleanup( $asset );
|
||||
my $unpacked = qq{<title>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ is(-d $accessibleDirectory, 1, "exportCheckPath creating subdirectory actually c
|
|||
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Asset Export Test"});
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
my $importNode = WebGUI::Asset->getImportNode($session);
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ cmp_deeply(
|
|||
#----------------------------------------------------------------------------
|
||||
# Add another new revision, changing the privs
|
||||
my $newRev = $asset->addRevision( { ownerUserId => '3', groupIdView => '3' }, time + 5 );
|
||||
addToCleanup( $newRev );
|
||||
WebGUI::Test->addToCleanup( $newRev );
|
||||
$privs = JSON->new->decode( $newRev->getStorageLocation->getFileContentsAsScalar('.wgaccess') );
|
||||
cmp_deeply(
|
||||
$privs,
|
||||
|
|
@ -123,7 +123,7 @@ cmp_deeply(
|
|||
|
||||
# Add a new revision, changing the privs
|
||||
my $newRev = $asset->addRevision( { groupIdView => '7' }, time + 8 );
|
||||
addToCleanup( $newRev );
|
||||
WebGUI::Test->addToCleanup( $newRev );
|
||||
is( $newRev->getStorageLocation->getFileContentsAsScalar('.wgaccess'), undef, "wgaccess doesn't exist" );
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -144,7 +144,7 @@ $asset->update({
|
|||
filename => $filename,
|
||||
});
|
||||
|
||||
addToCleanup( $asset );
|
||||
WebGUI::Test->addToCleanup( $asset );
|
||||
$asset->trash;
|
||||
my $storage = $asset->getStorageLocation;
|
||||
my $dir = $storage->getPathClassDir();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ my $versionTag = WebGUI::VersionTag->getWorking($session);
|
|||
# Name version tag and make sure it gets cleaned up
|
||||
$versionTag->set({name=>"Orientation adjustment test"});
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
# Create gallery and a single album
|
||||
my $gallery
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ my $node = WebGUI::Asset->getImportNode( $session );
|
|||
|
||||
# Create version tag and make sure it gets cleaned up
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
# Override some settings to make things easier to test
|
||||
# userFunctionStyleId
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ $rectangle->setBackgroundColor('#0000FF');
|
|||
|
||||
##Create a storage location
|
||||
my $storage = WebGUI::Storage->create($session);
|
||||
addToCleanup($storage);
|
||||
WebGUI::Test->addToCleanup($storage);
|
||||
|
||||
##Save the image to the location
|
||||
$rectangle->saveToStorageLocation($storage, 'blue.png');
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ my $node = WebGUI::Asset->getImportNode($session);
|
|||
# Grab a named version tag
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Collab setup"});
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
# Need to create a Collaboration system in which the post lives.
|
||||
my @addArgs = ( undef, undef, { skipNotification => 1 } );
|
||||
|
|
@ -78,7 +78,7 @@ note 'getCSLinkUrl';
|
|||
my @newThreads;
|
||||
my $threadCount = 15;
|
||||
my $versionTag2 = WebGUI::VersionTag->getWorking($session);
|
||||
addToCleanup( $versionTag2 );
|
||||
WebGUI::Test->addToCleanup( $versionTag2 );
|
||||
$props->{tagId} = $versionTag2->getId;
|
||||
while ($threadCount--) {
|
||||
push @newThreads, $collab->addChild($props, @addArgs);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ my $node = WebGUI::Asset->getImportNode($session);
|
|||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Snippet Test"});
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
my $snippet = $node->addChild({className=>'WebGUI::Asset::Snippet', %tag});
|
||||
|
||||
# Make sure TemplateToolkit is in the config file
|
||||
|
|
@ -103,7 +103,7 @@ $tag{tagId} = $tag2->getId;
|
|||
my $snippet2 = $node->addChild({className => 'WebGUI::Asset::Snippet', %tag});
|
||||
$snippet2->update({mimeType => 'text/javascript'});
|
||||
$tag2->commit;
|
||||
addToCleanup($tag2);
|
||||
WebGUI::Test->addToCleanup($tag2);
|
||||
|
||||
$snippet2->snippet('uncompressable');
|
||||
is $snippet2->snippetPacked, 'uncompressable', 'packed snippet content was set';
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use JSON qw{ from_json };
|
|||
|
||||
my $session = WebGUI::Test->session;
|
||||
my $tag = WebGUI::VersionTag->getWorking($session);
|
||||
addToCleanup( $tag );
|
||||
WebGUI::Test->addToCleanup( $tag );
|
||||
my %tag = ( tagId => $tag->getId, status => "pending" );
|
||||
my $default = $session->config->get('defaultTemplateParser');
|
||||
my $ht = 'WebGUI::Asset::Template::HTMLTemplate';
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ my $node = WebGUI::Asset->getImportNode($session);
|
|||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Wiki Test"});
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
my $assetEdit = WebGUI::Group->new($session, "new");
|
||||
my $wikiAdmin = WebGUI::Group->new($session, "new");
|
||||
my $wikiEditPage = WebGUI::Group->new($session, "new");
|
||||
addToCleanup($assetEdit, $wikiAdmin, $wikiEditPage);
|
||||
WebGUI::Test->addToCleanup($assetEdit, $wikiAdmin, $wikiEditPage);
|
||||
|
||||
my $assetEditor = WebGUI::User->create($session);
|
||||
$assetEdit->addUsers([$assetEditor->userId]);
|
||||
|
|
@ -39,7 +39,7 @@ my $wikiPageEditor = WebGUI::User->create($session);
|
|||
$wikiEditPage->addUsers([$wikiPageEditor->userId]);
|
||||
my $wikiOwner = WebGUI::User->create($session);
|
||||
my $wikiPageOwner = WebGUI::User->create($session);
|
||||
addToCleanup($assetEditor, $wikiAdministrator, $wikiPageEditor, $wikiOwner, $wikiPageOwner);
|
||||
WebGUI::Test->addToCleanup($assetEditor, $wikiAdministrator, $wikiPageEditor, $wikiOwner, $wikiPageOwner);
|
||||
|
||||
$session->user({user => $wikiOwner});
|
||||
my $wiki = $node->addChild({
|
||||
|
|
@ -57,7 +57,7 @@ my $wikipage = $wiki->addChild({
|
|||
}, undef, undef, {skipAutoCommitWorkflows => 1, skipNotification => 1});
|
||||
is $wikipage->get('ownerUserId'), $wikiPageOwner->userId, 'wiki page owned by correct user';
|
||||
|
||||
addToCleanup($wikipage);
|
||||
WebGUI::Test->addToCleanup($wikipage);
|
||||
|
||||
# Test for sane object types
|
||||
isa_ok($wiki, 'WebGUI::Asset::Wobject::WikiMaster');
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ my $coincidentHigh = $windowCal->addChild({
|
|||
# Everything above the window should be included in the set of events returned.
|
||||
|
||||
$tag2->commit;
|
||||
addToCleanup($tag2);
|
||||
WebGUI::Test->addToCleanup($tag2);
|
||||
|
||||
is(scalar @{ $windowCal->getLineage(['children'])}, 17, 'added events to the window calendar');
|
||||
|
||||
|
|
@ -556,7 +556,7 @@ my $prevDay = $listCal->addChild({
|
|||
|
||||
my $tag6 = WebGUI::VersionTag->getWorking($session);
|
||||
$tag6->commit;
|
||||
addToCleanup($tag6);
|
||||
WebGUI::Test->addToCleanup($tag6);
|
||||
|
||||
my $listVars = $listCal->viewList({ start => $bday });
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ my $node = WebGUI::Test->asset;
|
|||
|
||||
# grab a named version tag
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
$versionTag->set({name => 'Collaboration => groupToEditPost test'});
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ my $props = {
|
|||
my $thread = $collab->addChild($props, @addChildCoda);
|
||||
$thread->setSkipNotification;
|
||||
$tag1->commit;
|
||||
addToCleanup($tag1);
|
||||
WebGUI::Test->addToCleanup($tag1);
|
||||
|
||||
# Test for a sane object type
|
||||
isa_ok($thread, 'WebGUI::Asset::Post::Thread');
|
||||
|
|
@ -89,7 +89,7 @@ $props = {
|
|||
my $thread2 = $collab->addChild($props, @addChildCoda);
|
||||
$thread2->setSkipNotification;
|
||||
$tag2->commit;
|
||||
addToCleanup($tag2);
|
||||
WebGUI::Test->addToCleanup($tag2);
|
||||
|
||||
my $rssitems = $collab->getRssFeedItems();
|
||||
is(scalar @{ $rssitems }, 2, 'rssitems set to number of posts added');
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ foreach my $index (1 .. 5) {
|
|||
$newThreads[$index]->setSkipNotification;
|
||||
}
|
||||
$vt2->commit;
|
||||
addToCleanup($vt2);
|
||||
WebGUI::Test->addToCleanup($vt2);
|
||||
|
||||
$session->user({userId => 3});
|
||||
$templateVars = $collab->getViewTemplateVars();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ my $versionTag = WebGUI::VersionTag->getWorking($session);
|
|||
|
||||
$versionTag->set( { name=>"Gallery Search Test" } );
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
addToCleanup( $versionTag );
|
||||
WebGUI::Test->addToCleanup( $versionTag );
|
||||
|
||||
# Create gallery and a single album
|
||||
my $gallery
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ my $node = WebGUI::Asset->getImportNode($session);
|
|||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
$versionTag->set({name=>"Add Archive to Album Test"});
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
my $gallery
|
||||
= $node->addChild({
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ is($todayFolder->get('styleTemplateId'), $archive->get('styleTemplateId'), '...
|
|||
className => 'WebGUI::Asset::Wobject::StoryArchive',
|
||||
title => 'Extension Tester',
|
||||
});
|
||||
addToCleanup($arch2);
|
||||
WebGUI::Test->addToCleanup($arch2);
|
||||
|
||||
is $arch2->get('url'),
|
||||
$home->get('url').'/extension-tester.ext',
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ my $root = WebGUI::Asset->getRoot($session);
|
|||
'AssetHelper/Copy forks a process'
|
||||
);
|
||||
|
||||
addToCleanup( 'WebGUI::Fork' => $output->{forkId} );
|
||||
WebGUI::Test->addToCleanup( 'WebGUI::Fork' => $output->{forkId} );
|
||||
}
|
||||
|
||||
ok(WebGUI::Test->waitForAllForks(10), "Forks finished");
|
||||
|
|
@ -62,6 +62,6 @@ ok(WebGUI::Test->waitForAllForks(10), "Forks finished");
|
|||
$session->cache->clear;
|
||||
my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,});
|
||||
is @{ $clippies }, 1, '... only copied 1 asset to the clipboard, no children';
|
||||
addToCleanup(@{ $clippies });
|
||||
WebGUI::Test->addToCleanup(@{ $clippies });
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ my $grand = $child->addChild({
|
|||
%tag,
|
||||
});
|
||||
$tag->commit;
|
||||
addToCleanup( $tag );
|
||||
WebGUI::Test->addToCleanup( $tag );
|
||||
|
||||
{
|
||||
my $helper = WebGUI::AssetHelper::CopyBranch->new( id => 'copy_branch', session => $session, asset => $top );
|
||||
|
|
@ -88,6 +88,6 @@ $mech->get_ok( '/?op=assetHelper;helperId=copy_branch;method=copy;with=descendan
|
|||
WebGUI::Test->waitForAllForks;
|
||||
my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,});
|
||||
is @{ $clippies }, 3, '... copied 3 asset to the clipboard';
|
||||
addToCleanup( @$clippies );
|
||||
WebGUI::Test->addToCleanup( @$clippies );
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ my $home = WebGUI::Test->asset;
|
|||
|
||||
my $editor = WebGUI::User->create($session);
|
||||
$editor->addToGroups([4]);
|
||||
addToCleanup($editor);
|
||||
WebGUI::Test->addToCleanup($editor);
|
||||
|
||||
$session->user({userId => 3});
|
||||
my $newPage = $home->addChild({
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ my $helper = WebGUI::AssetHelper::Product::ExportCSV->new(
|
|||
);
|
||||
my $exportProducts = \&WebGUI::AssetHelper::Product::ExportCSV::exportProducts;
|
||||
my $process = Test::MockObject::Extends->new( WebGUI::Fork->create( $session ) );
|
||||
addToCleanup( sub { $process->delete } );
|
||||
WebGUI::Test->addToCleanup( sub { $process->delete } );
|
||||
|
||||
$exportProducts->($process, {});
|
||||
# Determine the storage location from the URL
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ my $ldapProps = WebGUI::Test->getSmokeLDAPProps();
|
|||
|
||||
$session->db->setRow("ldapLink","ldapLinkId",$ldapProps, $ldapProps->{ldapLinkId});
|
||||
my $ldapLink = WebGUI::LDAPLink->new( $session, $ldapProps->{ldapLinkId} );
|
||||
addToCleanup($ldapLink);
|
||||
WebGUI::Test->addToCleanup($ldapLink);
|
||||
my $ldap = $ldapLink->bind;
|
||||
$session->setting->set('ldapConnection', $ldapProps->{ldapLinkId} );
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ $ldapGroup->set( "ldapLinkId", $ldapProps->{ldapLinkId} );
|
|||
$ldapGroup->set( "ldapGroup", "cn=Convicts,o=shawshank" );
|
||||
$ldapGroup->set( "ldapGroupProperty", "member" );
|
||||
$ldapGroup->set( "ldapRecursiveProperty", "uid" );
|
||||
addToCleanup($ldapGroup);
|
||||
WebGUI::Test->addToCleanup($ldapGroup);
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ use WebGUI::Auth::WebGUI;
|
|||
my $session = WebGUI::Test->session;
|
||||
|
||||
my $user = WebGUI::User->create( $session );
|
||||
addToCleanup( $user );
|
||||
WebGUI::Test->addToCleanup( $user );
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Test instance
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ my $dbLinkParams = {
|
|||
};
|
||||
|
||||
$dbLink = WebGUI::DatabaseLink->create($session, $dbLinkParams);
|
||||
addToCleanup($dbLink);
|
||||
WebGUI::Test->addToCleanup($dbLink);
|
||||
$dbLinkParams->{databaseLinkId} = ignore();
|
||||
|
||||
cmp_deeply(
|
||||
|
|
|
|||
|
|
@ -107,6 +107,6 @@ sub addUser {
|
|||
##so the test will not fail in the summer
|
||||
$user->profileField("timeZone","America/Hermosillo");
|
||||
$user->username("Time Zone");
|
||||
addToCleanup($user);
|
||||
WebGUI::Test->addToCleanup($user);
|
||||
return $user;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ ok(! WebGUI::Group->vitalGroup('27'), '... 27 is not vital');
|
|||
# Normal group
|
||||
my $happyDude = WebGUI::User->create( $session );
|
||||
$happyDude->username(" Happy Dude ");
|
||||
addToCleanup( $happyDude );
|
||||
WebGUI::Test->addToCleanup( $happyDude );
|
||||
|
||||
$gA->addUsers([ $happyDude->getId ]);
|
||||
$gB->addUsers([ $happyDude->getId ]);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ plan tests => 9; # Increment this number for each test you create
|
|||
|
||||
{
|
||||
my $ldap = WebGUI::LDAPLink->new($session, "new");
|
||||
addToCleanup($ldap);
|
||||
WebGUI::Test->addToCleanup($ldap);
|
||||
isa_ok($ldap, 'WebGUI::LDAPLink');
|
||||
is $ldap->{_ldapLinkId}, "new", '... created with correct linkId';
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ plan tests => 9; # Increment this number for each test you create
|
|||
my $ldapProps = WebGUI::Test->getSmokeLDAPProps();
|
||||
$session->db->setRow('ldapLink', 'ldapLinkId', $ldapProps, $ldapProps->{ldapLinkId});
|
||||
my $ldap = WebGUI::LDAPLink->new($session, $ldapProps->{ldapLinkId});
|
||||
addToCleanup($ldap);
|
||||
WebGUI::Test->addToCleanup($ldap);
|
||||
cmp_deeply $ldap->get(), superhashof($ldapProps), 'all db properties retrieved';
|
||||
my $connection = $ldap->bind();
|
||||
isa_ok $connection, 'Net::LDAP', 'returned by bind';
|
||||
|
|
@ -73,7 +73,7 @@ plan tests => 9; # Increment this number for each test you create
|
|||
$ldapProps->{identifier} = 'hadley';
|
||||
$session->db->setRow('ldapLink', 'ldapLinkId', $ldapProps, $ldapProps->{ldapLinkId});
|
||||
my $ldap = WebGUI::LDAPLink->new($session, $ldapProps->{ldapLinkId});
|
||||
addToCleanup($ldap);
|
||||
WebGUI::Test->addToCleanup($ldap);
|
||||
my $connection = $ldap->bind();
|
||||
isa_ok $connection, 'Net::LDAP', 'returned by bind';
|
||||
is $ldap->{_error}, 104, 'auth error due to bad identifier';
|
||||
|
|
|
|||
|
|
@ -98,6 +98,6 @@ sub setupTest {
|
|||
$users[1]->addToGroups([$cm->getId]);
|
||||
##User 2 is a member of a content manager sub-group
|
||||
$users[2]->addToGroups([$editGroup->getId]);
|
||||
addToCleanup($editGroup, @users);
|
||||
WebGUI::Test->addToCleanup($editGroup, @users);
|
||||
return ($asset, $editGroup, @users);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,13 +145,13 @@ sub setupTest {
|
|||
$groups[1] = WebGUI::Group->new($session, "new");
|
||||
$groups[1]->name('Regular Old Group');
|
||||
$groups[1]->autoAdd(0);
|
||||
addToCleanup(@groups);
|
||||
WebGUI::Test->addToCleanup(@groups);
|
||||
|
||||
##Three users. One in each group and one with no group membership
|
||||
my @users = map { WebGUI::User->new($session, "new") } 0..2;
|
||||
$users[0]->addToGroups([$groups[0]->getId]);
|
||||
$users[1]->addToGroups([$groups[1]->getId]);
|
||||
addToCleanup(@users);
|
||||
WebGUI::Test->addToCleanup(@users);
|
||||
|
||||
my $properties = {
|
||||
title => 'GroupAdd test template',
|
||||
|
|
|
|||
|
|
@ -144,13 +144,13 @@ sub setupTest {
|
|||
$groups[1] = WebGUI::Group->new($session, "new");
|
||||
$groups[1]->name('Regular Old Group');
|
||||
$groups[1]->autoDelete(0);
|
||||
addToCleanup(@groups);
|
||||
WebGUI::Test->addToCleanup(@groups);
|
||||
|
||||
##Three users. One in each group and one with no group membership
|
||||
my @users = map { WebGUI::User->new($session, "new") } 0..2;
|
||||
$users[0]->addToGroups([$groups[0]->getId]);
|
||||
$users[1]->addToGroups([$groups[1]->getId]);
|
||||
addToCleanup(@users);
|
||||
WebGUI::Test->addToCleanup(@users);
|
||||
|
||||
my $properties = {
|
||||
title => 'GroupDelete test template',
|
||||
|
|
|
|||
|
|
@ -57,14 +57,14 @@ my $sth = $session->db->prepare('INSERT INTO myUserTable VALUES(?)');
|
|||
foreach my $mob (@mob) {
|
||||
$sth->execute([ $mob->userId ]);
|
||||
}
|
||||
addToCleanup(@mob);
|
||||
WebGUI::Test->addToCleanup(@mob);
|
||||
|
||||
##Create the 3 groups
|
||||
|
||||
$ms_users = WebGUI::Group->new($session, "new");
|
||||
$ms_distributors = WebGUI::Group->new($session, "new");
|
||||
$ms_int_distributors = WebGUI::Group->new($session, "new");
|
||||
addToCleanup($ms_users, $ms_distributors, $ms_int_distributors);
|
||||
WebGUI::Test->addToCleanup($ms_users, $ms_distributors, $ms_int_distributors);
|
||||
|
||||
$ms_users->name('MS Users');
|
||||
$ms_distributors->name('MS Distributors');
|
||||
|
|
@ -86,7 +86,7 @@ $ms_distributors->addGroups([$ms_int_distributors->getId]);
|
|||
|
||||
$disti = WebGUI::User->new($session, 'new');
|
||||
$int_disti = WebGUI::User->new($session, 'new');
|
||||
addToCleanup($disti, $int_disti);
|
||||
WebGUI::Test->addToCleanup($disti, $int_disti);
|
||||
|
||||
$ms_distributors->addUsers([$disti->userId]);
|
||||
$ms_int_distributors->addUsers([$int_disti->userId]);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ my $donation = WebGUI::Asset->getRoot($session)->addChild({
|
|||
});
|
||||
|
||||
my $template = setupJSONtemplate($session);
|
||||
addToCleanup($cart, $donation, $template);
|
||||
WebGUI::Test->addToCleanup($cart, $donation, $template);
|
||||
|
||||
my $json;
|
||||
my $templateVars;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ plan tests => $numTests;
|
|||
|
||||
my $inboxUser = WebGUI::User->create($session);
|
||||
$session->user({userId => $inboxUser->getId});
|
||||
addToCleanup($inboxUser);
|
||||
WebGUI::Test->addToCleanup($inboxUser);
|
||||
|
||||
my $inbox = WebGUI::Inbox->new($session);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
|
|||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Adding assets for RootTitle tests"});
|
||||
my %tag = ( tagId => $versionTag->getId, status => "pending" );
|
||||
addToCleanup($versionTag);
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
||||
my $root = WebGUI::Asset->getRoot($session);
|
||||
my %properties_A = (
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ foreach my $testSet (@testSets) {
|
|||
$WebGUIdbLink->set({allowMacroAccess=>$originalMacroAccessValue});
|
||||
|
||||
my $newLinkId = $WebGUIdbLink->copy;
|
||||
addToCleanup(WebGUI::DatabaseLink->new($session, $newLinkId));
|
||||
WebGUI::Test->addToCleanup(WebGUI::DatabaseLink->new($session, $newLinkId));
|
||||
my $output = WebGUI::Macro::SQL::process(
|
||||
$session,
|
||||
q{show columns from testTable like 'zero'},
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ sub setupUsers {
|
|||
my $newSession = WebGUI::Session->open(WebGUI::Test::file);
|
||||
$newSession->user({user => $_});
|
||||
}
|
||||
addToCleanup(@users);
|
||||
WebGUI::Test->addToCleanup(@users);
|
||||
return @users;
|
||||
}
|
||||
|
||||
|
|
@ -232,6 +232,6 @@ sub setupJSONtemplate {
|
|||
}
|
||||
EOTMPL
|
||||
my $template = WebGUI::Asset->getImportNode($session)->addChild({className=>'WebGUI::Asset::Template', parser => 'WebGUI::Asset::Template::HTMLTemplate', namespace => 'Macro/UsersOnline', template=>$templateBody});
|
||||
addToCleanup($template);
|
||||
WebGUI::Test->addToCleanup($template);
|
||||
return $template;
|
||||
}
|
||||
|
|
|
|||
2
t/SQL.t
2
t/SQL.t
|
|
@ -173,7 +173,7 @@ SKIP: {
|
|||
skip("No InnoDB tables in this MySQL. Skipping all transaction related tests.",7) if (lc $mysqlVariables{have_innodb} ne 'yes');
|
||||
$session->db->dbh->do('DROP TABLE IF EXISTS testTable');
|
||||
$session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message CHAR(64), PRIMARY KEY(myIndex)) TYPE=InnoDB');
|
||||
addToCleanup( SQL => 'DROP TABLE testTable' );
|
||||
WebGUI::Test->addToCleanup( SQL => 'DROP TABLE testTable' );
|
||||
|
||||
my $dbh2 = WebGUI::SQL->connect($session->config->get("dsn"), $session->config->get("dbuser"), $session->config->get("dbpass"));
|
||||
my ($sth, $sth2, $rc);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ $driver = WebGUI::Shop::ShipDriver::UPS->new($session, {
|
|||
enabled => 1,
|
||||
shipType => 'PARCEL',
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
eval { $driver->calculate() };
|
||||
$e = Exception::Class->caught();
|
||||
|
|
@ -218,7 +218,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
my $cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ my $options = {
|
|||
};
|
||||
|
||||
$driver2 = WebGUI::Shop::ShipDriver::USPS->new($session, $options);
|
||||
addToCleanup($driver2);
|
||||
WebGUI::Test->addToCleanup($driver2);
|
||||
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPS');
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver');
|
||||
|
|
@ -153,7 +153,7 @@ my $driver = WebGUI::Shop::ShipDriver::USPS->new($session, {
|
|||
enabled => 1,
|
||||
shipType => 'PARCEL',
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
my $e;
|
||||
eval { $driver->calculate() };
|
||||
|
|
@ -183,7 +183,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
$cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ my $options = {
|
|||
};
|
||||
|
||||
$driver2 = WebGUI::Shop::ShipDriver::USPSInternational->new($session, $options);
|
||||
addToCleanup($driver2);
|
||||
WebGUI::Test->addToCleanup($driver2);
|
||||
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPSInternational');
|
||||
isa_ok($driver2, 'WebGUI::Shop::ShipDriver');
|
||||
|
|
@ -152,7 +152,7 @@ my $driver = WebGUI::Shop::ShipDriver::USPSInternational->new($session, {
|
|||
label => 'Shipping from Shawshank',
|
||||
enabled => 1,
|
||||
});
|
||||
addToCleanup($driver);
|
||||
WebGUI::Test->addToCleanup($driver);
|
||||
|
||||
my $e;
|
||||
eval { $driver->calculate() };
|
||||
|
|
@ -167,7 +167,7 @@ cmp_deeply(
|
|||
);
|
||||
|
||||
$cart = WebGUI::Shop::Cart->newBySession($session);
|
||||
addToCleanup($cart);
|
||||
WebGUI::Test->addToCleanup($cart);
|
||||
my $addressBook = $cart->getAddressBook;
|
||||
my $workAddress = $addressBook->addAddress({
|
||||
label => 'work',
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ my $transaction = WebGUI::Shop::Transaction->new($session,{
|
|||
paymentDriverLabel => 'kkk',
|
||||
taxes => 7,
|
||||
});
|
||||
addToCleanup($transaction);
|
||||
WebGUI::Test->addToCleanup($transaction);
|
||||
|
||||
# objects work
|
||||
isa_ok($transaction, "WebGUI::Shop::Transaction");
|
||||
|
|
@ -243,13 +243,13 @@ my $shopGroup = WebGUI::Group->new($session, 'new');
|
|||
my $shopAdmin = WebGUI::User->create($session);
|
||||
$shopUser->username('shopAdmin');
|
||||
$shopGroup->addUsers([$shopAdmin->getId]);
|
||||
addToCleanup($shopUser, $shopAdmin, $shopGroup);
|
||||
WebGUI::Test->addToCleanup($shopUser, $shopAdmin, $shopGroup);
|
||||
$session->setting->set('shopSaleNotificationGroupId', $shopGroup->getId);
|
||||
$session->user({userId => $shopUser->getId});
|
||||
|
||||
my $trans = WebGUI::Shop::Transaction->new($session, {});
|
||||
ok($trans->can('sendNotifications'), 'sendNotifications: valid method for transactions');
|
||||
addToCleanup($trans);
|
||||
WebGUI::Test->addToCleanup($trans);
|
||||
|
||||
##Disable sending email
|
||||
my $sendmock = Test::MockObject->new( {} );
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ sub processed_ok {
|
|||
template => $template,
|
||||
}
|
||||
);
|
||||
addToCleanup($tmpl);
|
||||
WebGUI::Test->addToCleanup($tmpl);
|
||||
is( $tmpl->process( {
|
||||
his => { yes => 'yes', stop => 'stop' },
|
||||
my => { yes => 'no', stop => 'go' }
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ END_PM
|
|||
isa_ok $package, 'WebGUI::Asset::Template';
|
||||
my $vtId = $package->get('tagId');
|
||||
my $vt = WebGUI::VersionTag->new($session, $vtId);
|
||||
addToCleanup($vt);
|
||||
WebGUI::Test->addToCleanup($vt);
|
||||
is $vt->get('name'), 'Upgrade to 8.3.0 - test-template', 'package import names version tag correctly';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ $siteWideTag->rollback();
|
|||
# create admin session
|
||||
$admin_session = WebGUI::Test->newSession;
|
||||
WebGUI::Test->addToCleanup($admin_session);
|
||||
addToCleanup($admin_session);
|
||||
WebGUI::Test->addToCleanup($admin_session);
|
||||
$admin_session->user({'userId' => 3});
|
||||
|
||||
setUserVersionTagMode($admin_session->user(), q{autoCommit});
|
||||
|
|
@ -436,10 +436,10 @@ my $redSession = WebGUI::Test->newSession();
|
|||
|
||||
my $andy = WebGUI::User->create($andySession);
|
||||
my $red = WebGUI::User->create($redSession);
|
||||
addToCleanup($andy, $red);
|
||||
WebGUI::Test->addToCleanup($andy, $red);
|
||||
|
||||
my $andyTag = WebGUI::VersionTag->getWorking($andySession);
|
||||
addToCleanup($andyTag);
|
||||
WebGUI::Test->addToCleanup($andyTag);
|
||||
my $redTag = WebGUI::VersionTag->new($redSession, $andyTag->getId);
|
||||
$redTag->setWorking();
|
||||
is($andyTag->getId, $redTag->getId, 'users share the same version tag');
|
||||
|
|
@ -459,7 +459,7 @@ $andyTag2->clearWorking;
|
|||
my $andyTagCheck = WebGUI::VersionTag->getWorking($andySession, 'nocreate');
|
||||
is($andyTagCheck, undef, 'clearWorking: user andy does not have tag');
|
||||
my $redSession2 = $redSession->duplicate;
|
||||
addToCleanup($redSession2);
|
||||
WebGUI::Test->addToCleanup($redSession2);
|
||||
my $redTagCheck = WebGUI::VersionTag->getWorking($redSession2, 'nocreate');
|
||||
is($redTagCheck, undef, 'red does not either');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ my $workflow = WebGUI::Workflow->create($session,
|
|||
mode => 'realtime',
|
||||
},
|
||||
);
|
||||
addToCleanup($workflow);
|
||||
WebGUI::Test->addToCleanup($workflow);
|
||||
|
||||
my $threshold = $workflow->addActivity('WebGUI::Workflow::Activity::NotifyAboutLowStock');
|
||||
$threshold->set('className' , 'WebGUI::Activity::NotifyAboutLowStock');
|
||||
|
|
@ -166,7 +166,7 @@ my $movieVarId = $movie_posters->setCollateral('variantsJSON', 'variantId', 'new
|
|||
},
|
||||
);
|
||||
my $otherTag = WebGUI::VersionTag->getWorking($session);
|
||||
addToCleanup($otherTag);
|
||||
WebGUI::Test->addToCleanup($otherTag);
|
||||
$otherTag->commit;
|
||||
|
||||
$threshold->set('warningLimit' , 10);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ plan tests => 9; # Increment this number for each test you create
|
|||
my $number = 'NL34567890';
|
||||
my $user = WebGUI::User->new( $session, 'new' );
|
||||
my $userId = $user->userId;
|
||||
addToCleanup( $user );
|
||||
WebGUI::Test->addToCleanup( $user );
|
||||
|
||||
# --- valid number ----------------
|
||||
$return = 'VALID';
|
||||
|
|
@ -94,7 +94,7 @@ sub createInstance {
|
|||
} );
|
||||
my $activity = $workflow->addActivity( 'WebGUI::Workflow::Activity::RecheckVATNumber' );
|
||||
|
||||
addToCleanup( $workflow );
|
||||
WebGUI::Test->addToCleanup( $workflow );
|
||||
|
||||
my $instance = WebGUI::Workflow::Instance->create( $session, {
|
||||
workflowId => $workflow->getId,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ my $wf = WebGUI::Workflow->create(
|
|||
}
|
||||
);
|
||||
isa_ok($wf, 'WebGUI::Workflow', 'workflow created for test');
|
||||
addToCleanup($wf);
|
||||
WebGUI::Test->addToCleanup($wf);
|
||||
|
||||
# create an instance of $wfId
|
||||
my $properties = {
|
||||
|
|
@ -179,7 +179,7 @@ my $wf2 = WebGUI::Workflow->create(
|
|||
type => 'None',
|
||||
}
|
||||
);
|
||||
addToCleanup($wf2);
|
||||
WebGUI::Test->addToCleanup($wf2);
|
||||
|
||||
my $wf2Instance = WebGUI::Workflow::Instance->create($session, {workflowId => $wf2->getId});
|
||||
cmp_deeply($wf2Instance->get('parameters'), {}, 'get returns {} for parameters when there are no parameters stored');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue