Skip to content

Commit 82bb59d

Browse files
committedOct 19, 2011
Debug needs an explicit package name for addToCleanup.
1 parent 19b6f9d commit 82bb59d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+99
-99
lines changed
 

‎t/Asset.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ my $session = WebGUI::Test->session;
306306
is $revAsset->revisedBy, $session->user->userId, 'revisedBy is current session user';
307307
my $count = $session->db->quickScalar('SELECT COUNT(*) from assetData where assetId=?',[$testId2]);
308308
is $count, 2, 'two records in the database';
309-
addToCleanup($tag);
309+
WebGUI::Test->addToCleanup($tag);
310310

311311
$session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'");
312312
$session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'");

‎t/Asset/Asset.t

+20-20
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ $testGroups{'canEdit asset'} = WebGUI::Group->new($session, 'new');
5959
$testUsers{'canEdit group user'} = WebGUI::User->new($session, 'new');
6060
$testUsers{'canEdit group user'}->addToGroups([$testGroups{'canEdit asset'}->getId]);
6161
$testUsers{'canEdit group user'}->username('Edit Group User');
62-
addToCleanup($testGroups{'canEdit asset'});
62+
WebGUI::Test->addToCleanup($testGroups{'canEdit asset'});
6363

6464
##A group and user for groupIdEdit
6565
$testGroups{'canAdd asset'} = WebGUI::Group->new($session, 'new');
6666
$testUsers{'canAdd group user'} = WebGUI::User->new($session, 'new');
6767
$testUsers{'canAdd group user'}->addToGroups([$testGroups{'canAdd asset'}->getId]);
6868
$testUsers{'canEdit group user'}->username('Can Add Group User');
69-
addToCleanup($testGroups{'canAdd asset'}, values %testUsers);
69+
WebGUI::Test->addToCleanup($testGroups{'canAdd asset'}, values %testUsers);
7070

7171
my $canAddMaker = WebGUI::Test::Maker::Permission->new();
7272
$canAddMaker->prepare({
@@ -99,7 +99,7 @@ $properties = {
9999
};
100100

101101
my $canEditAsset = $rootAsset->addChild($properties, $properties->{id});
102-
addToCleanup( $canEditAsset );
102+
WebGUI::Test->addToCleanup( $canEditAsset );
103103
$properties = {}; ##Clear out the hash so that it doesn't leak later by accident.
104104

105105
my $canEditMaker = WebGUI::Test::Maker::Permission->new();
@@ -123,7 +123,7 @@ $properties = {
123123

124124

125125
my $canViewAsset = $rootAsset->addChild($properties, $properties->{id});
126-
addToCleanup( $canViewAsset );
126+
WebGUI::Test->addToCleanup( $canViewAsset );
127127
$properties = {}; ##Clear out the hash so that it doesn't leak later by accident.
128128

129129
my $canViewMaker = WebGUI::Test::Maker::Permission->new();
@@ -363,37 +363,37 @@ my $properties = {
363363
};
364364

365365
my $fixUrlAsset = $defaultAsset->addChild($properties, $properties->{id});
366-
addToCleanup( $fixUrlAsset );
366+
WebGUI::Test->addToCleanup( $fixUrlAsset );
367367

368368
# '1234567890123456789012'
369369
$properties->{id} = 'fixUrlAsset00000000013';
370370
$properties->{url} = 'fixUrlFolderURL9';
371371

372372
my $fixUrlAsset2 = $defaultAsset->addChild($properties, $properties->{id});
373-
addToCleanup( $fixUrlAsset2 );
373+
WebGUI::Test->addToCleanup( $fixUrlAsset2 );
374374

375375
# '1234567890123456789012'
376376
$properties->{id} = 'fixUrlAsset00000000014';
377377
$properties->{url} = 'fixUrlFolderURL00';
378378

379379
my $fixUrlAsset3 = $defaultAsset->addChild($properties, $properties->{id});
380-
addToCleanup( $fixUrlAsset3 );
380+
WebGUI::Test->addToCleanup( $fixUrlAsset3 );
381381

382382
# '1234567890123456789012'
383383
$properties->{id} = 'fixUrlAsset00000000015';
384384
$properties->{url} = 'fixUrlFolderURL100';
385385

386386
my $fixUrlAsset4 = $defaultAsset->addChild($properties, $properties->{id});
387387
is($fixUrlAsset4->get('url'), 'fixurlfolderurl100', 'asset setup correctly for 100->101 test');
388-
addToCleanup( $fixUrlAsset4 );
388+
WebGUI::Test->addToCleanup( $fixUrlAsset4 );
389389

390390
delete $properties->{url};
391391
# '1234567890123456789012'
392392
$properties->{id} = 'fixUrlAsset00000000016';
393393
$properties->{menuTitle} = 'fix url folder url autogenerated';
394394

395395
my $fixUrlAsset5 = $defaultAsset->addChild($properties, $properties->{id});
396-
addToCleanup( $fixUrlAsset5 );
396+
WebGUI::Test->addToCleanup( $fixUrlAsset5 );
397397

398398
my $properties2 = {
399399
# '1234567890123456789012'
@@ -404,7 +404,7 @@ my $properties2 = {
404404
};
405405

406406
my $fixTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id});
407-
addToCleanup( $fixTitleAsset );
407+
WebGUI::Test->addToCleanup( $fixTitleAsset );
408408

409409
$properties2 = {
410410
# '1234567890123456789012'
@@ -415,7 +415,7 @@ $properties2 = {
415415
};
416416

417417
my $getTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id});
418-
addToCleanup( $getTitleAsset );
418+
WebGUI::Test->addToCleanup( $getTitleAsset );
419419

420420
$session->setting->set('urlExtension', undef);
421421

@@ -613,9 +613,9 @@ my $node = WebGUI::Asset->getRoot($session);
613613
my $product1 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
614614
my $product2 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
615615
my $product3 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1});
616-
addToCleanup($product1, $product2, $product3);
616+
WebGUI::Test->addToCleanup($product1, $product2, $product3);
617617
my $product4 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product', status => "pending"}, undef, undef, { skipAutoCommitWorkflows => 1});
618-
addToCleanup($product4);
618+
WebGUI::Test->addToCleanup($product4);
619619

620620
my $getAProduct = WebGUI::Asset::Sku::Product->getIsa($session);
621621
isa_ok($getAProduct, 'CODE');
@@ -666,7 +666,7 @@ $properties = {
666666
};
667667

668668
my $iufpAsset = $defaultAsset->addChild($properties, $properties->{id});
669-
addToCleanup( $iufpAsset );
669+
WebGUI::Test->addToCleanup( $iufpAsset );
670670
$iufpAsset->commit;
671671

672672
$properties2 = {
@@ -678,7 +678,7 @@ $properties2 = {
678678
};
679679

680680
my $iufpAsset2 = $iufpAsset->addChild($properties2, $properties2->{id});
681-
addToCleanup( $iufpAsset2 );
681+
WebGUI::Test->addToCleanup( $iufpAsset2 );
682682
$iufpAsset2->update( { inheritUrlFromParent => 1 } );
683683
is $iufpAsset2->inheritUrlFromParent, 1, 'inheritUrlFromParent set';
684684
$iufpAsset2->commit;
@@ -694,7 +694,7 @@ my $properties2a = {
694694
};
695695

696696
my $iufpAsset2a = $iufpAsset->addChild($properties2a, $properties2a->{id});
697-
addToCleanup( $iufpAsset2a );
697+
WebGUI::Test->addToCleanup( $iufpAsset2a );
698698
$iufpAsset2a->commit;
699699
is($iufpAsset2a->url, 'inheriturlfromparent01/inheriturlfromparent2a', '... works when created with the property');
700700

@@ -716,7 +716,7 @@ my $properties3 = {
716716
url => 'inheriturlfromparent03',
717717
};
718718
my $iufpAsset3 = $iufpAsset2->addChild($properties3, $properties3->{id});
719-
addToCleanup( $iufpAsset3 );
719+
WebGUI::Test->addToCleanup( $iufpAsset3 );
720720
$iufpAsset3->commit;
721721
$iufpAsset2->update( { inheritUrlFromParent => 1 } );
722722
$iufpAsset2->commit;
@@ -741,7 +741,7 @@ my $assetToCommit = $defaultAsset->addChild({
741741
status => "pending",
742742
tagId => $cloneTag->getId,
743743
});
744-
addToCleanup($cloneTag);
744+
WebGUI::Test->addToCleanup($cloneTag);
745745
$cloneTag->commit;
746746
is($assetToCommit->get('status'), 'pending', 'cloneFromDb: local asset is still pending');
747747
$assetToCommit = $assetToCommit->cloneFromDb;
@@ -760,7 +760,7 @@ my $trashedAsset = $defaultAsset->addChild({
760760
my $clippedAsset = $defaultAsset->addChild({
761761
className => 'WebGUI::Asset::Snippet', title => 'Clippy',
762762
});
763-
addToCleanup( $trashedAsset, $clippedAsset );
763+
WebGUI::Test->addToCleanup( $trashedAsset, $clippedAsset );
764764
$trashedAsset = $trashedAsset->cloneFromDb;
765765
$clippedAsset = $clippedAsset->cloneFromDb;
766766
$trashedAsset->trash;
@@ -800,7 +800,7 @@ use HTML::Packer;
800800
my $asset = WebGUI::Asset->getImportNode( $session )->addChild({
801801
className => 'WebGUI::Asset::Snippet',
802802
});
803-
addToCleanup( $asset );
803+
WebGUI::Test->addToCleanup( $asset );
804804
my $unpacked = qq{<title>
805805
806806

0 commit comments

Comments
 (0)
Please sign in to comment.