@@ -59,14 +59,14 @@ $testGroups{'canEdit asset'} = WebGUI::Group->new($session, 'new');
59
59
$testUsers {' canEdit group user' } = WebGUI::User-> new($session , ' new' );
60
60
$testUsers {' canEdit group user' }-> addToGroups([$testGroups {' canEdit asset' }-> getId]);
61
61
$testUsers {' canEdit group user' }-> username(' Edit Group User' );
62
- addToCleanup($testGroups {' canEdit asset' });
62
+ WebGUI::Test -> addToCleanup($testGroups {' canEdit asset' });
63
63
64
64
# #A group and user for groupIdEdit
65
65
$testGroups {' canAdd asset' } = WebGUI::Group-> new($session , ' new' );
66
66
$testUsers {' canAdd group user' } = WebGUI::User-> new($session , ' new' );
67
67
$testUsers {' canAdd group user' }-> addToGroups([$testGroups {' canAdd asset' }-> getId]);
68
68
$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 );
70
70
71
71
my $canAddMaker = WebGUI::Test::Maker::Permission-> new();
72
72
$canAddMaker -> prepare({
@@ -99,7 +99,7 @@ $properties = {
99
99
};
100
100
101
101
my $canEditAsset = $rootAsset -> addChild($properties , $properties -> {id });
102
- addToCleanup( $canEditAsset );
102
+ WebGUI::Test -> addToCleanup( $canEditAsset );
103
103
$properties = {}; # #Clear out the hash so that it doesn't leak later by accident.
104
104
105
105
my $canEditMaker = WebGUI::Test::Maker::Permission-> new();
@@ -123,7 +123,7 @@ $properties = {
123
123
124
124
125
125
my $canViewAsset = $rootAsset -> addChild($properties , $properties -> {id });
126
- addToCleanup( $canViewAsset );
126
+ WebGUI::Test -> addToCleanup( $canViewAsset );
127
127
$properties = {}; # #Clear out the hash so that it doesn't leak later by accident.
128
128
129
129
my $canViewMaker = WebGUI::Test::Maker::Permission-> new();
@@ -363,37 +363,37 @@ my $properties = {
363
363
};
364
364
365
365
my $fixUrlAsset = $defaultAsset -> addChild($properties , $properties -> {id });
366
- addToCleanup( $fixUrlAsset );
366
+ WebGUI::Test -> addToCleanup( $fixUrlAsset );
367
367
368
368
# '1234567890123456789012'
369
369
$properties -> {id } = ' fixUrlAsset00000000013' ;
370
370
$properties -> {url } = ' fixUrlFolderURL9' ;
371
371
372
372
my $fixUrlAsset2 = $defaultAsset -> addChild($properties , $properties -> {id });
373
- addToCleanup( $fixUrlAsset2 );
373
+ WebGUI::Test -> addToCleanup( $fixUrlAsset2 );
374
374
375
375
# '1234567890123456789012'
376
376
$properties -> {id } = ' fixUrlAsset00000000014' ;
377
377
$properties -> {url } = ' fixUrlFolderURL00' ;
378
378
379
379
my $fixUrlAsset3 = $defaultAsset -> addChild($properties , $properties -> {id });
380
- addToCleanup( $fixUrlAsset3 );
380
+ WebGUI::Test -> addToCleanup( $fixUrlAsset3 );
381
381
382
382
# '1234567890123456789012'
383
383
$properties -> {id } = ' fixUrlAsset00000000015' ;
384
384
$properties -> {url } = ' fixUrlFolderURL100' ;
385
385
386
386
my $fixUrlAsset4 = $defaultAsset -> addChild($properties , $properties -> {id });
387
387
is($fixUrlAsset4 -> get(' url' ), ' fixurlfolderurl100' , ' asset setup correctly for 100->101 test' );
388
- addToCleanup( $fixUrlAsset4 );
388
+ WebGUI::Test -> addToCleanup( $fixUrlAsset4 );
389
389
390
390
delete $properties -> {url };
391
391
# '1234567890123456789012'
392
392
$properties -> {id } = ' fixUrlAsset00000000016' ;
393
393
$properties -> {menuTitle } = ' fix url folder url autogenerated' ;
394
394
395
395
my $fixUrlAsset5 = $defaultAsset -> addChild($properties , $properties -> {id });
396
- addToCleanup( $fixUrlAsset5 );
396
+ WebGUI::Test -> addToCleanup( $fixUrlAsset5 );
397
397
398
398
my $properties2 = {
399
399
# '1234567890123456789012'
@@ -404,7 +404,7 @@ my $properties2 = {
404
404
};
405
405
406
406
my $fixTitleAsset = $defaultAsset -> addChild($properties2 , $properties2 -> {id });
407
- addToCleanup( $fixTitleAsset );
407
+ WebGUI::Test -> addToCleanup( $fixTitleAsset );
408
408
409
409
$properties2 = {
410
410
# '1234567890123456789012'
@@ -415,7 +415,7 @@ $properties2 = {
415
415
};
416
416
417
417
my $getTitleAsset = $defaultAsset -> addChild($properties2 , $properties2 -> {id });
418
- addToCleanup( $getTitleAsset );
418
+ WebGUI::Test -> addToCleanup( $getTitleAsset );
419
419
420
420
$session -> setting-> set(' urlExtension' , undef );
421
421
@@ -613,9 +613,9 @@ my $node = WebGUI::Asset->getRoot($session);
613
613
my $product1 = $node -> addChild({ className => ' WebGUI::Asset::Sku::Product' }, undef , undef , { skipAutoCommitWorkflows => 1});
614
614
my $product2 = $node -> addChild({ className => ' WebGUI::Asset::Sku::Product' }, undef , undef , { skipAutoCommitWorkflows => 1});
615
615
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 );
617
617
my $product4 = $node -> addChild({ className => ' WebGUI::Asset::Sku::Product' , status => " pending" }, undef , undef , { skipAutoCommitWorkflows => 1});
618
- addToCleanup($product4 );
618
+ WebGUI::Test -> addToCleanup($product4 );
619
619
620
620
my $getAProduct = WebGUI::Asset::Sku::Product-> getIsa($session );
621
621
isa_ok($getAProduct , ' CODE' );
@@ -666,7 +666,7 @@ $properties = {
666
666
};
667
667
668
668
my $iufpAsset = $defaultAsset -> addChild($properties , $properties -> {id });
669
- addToCleanup( $iufpAsset );
669
+ WebGUI::Test -> addToCleanup( $iufpAsset );
670
670
$iufpAsset -> commit;
671
671
672
672
$properties2 = {
@@ -678,7 +678,7 @@ $properties2 = {
678
678
};
679
679
680
680
my $iufpAsset2 = $iufpAsset -> addChild($properties2 , $properties2 -> {id });
681
- addToCleanup( $iufpAsset2 );
681
+ WebGUI::Test -> addToCleanup( $iufpAsset2 );
682
682
$iufpAsset2 -> update( { inheritUrlFromParent => 1 } );
683
683
is $iufpAsset2 -> inheritUrlFromParent, 1, ' inheritUrlFromParent set' ;
684
684
$iufpAsset2 -> commit;
@@ -694,7 +694,7 @@ my $properties2a = {
694
694
};
695
695
696
696
my $iufpAsset2a = $iufpAsset -> addChild($properties2a , $properties2a -> {id });
697
- addToCleanup( $iufpAsset2a );
697
+ WebGUI::Test -> addToCleanup( $iufpAsset2a );
698
698
$iufpAsset2a -> commit;
699
699
is($iufpAsset2a -> url, ' inheriturlfromparent01/inheriturlfromparent2a' , ' ... works when created with the property' );
700
700
@@ -716,7 +716,7 @@ my $properties3 = {
716
716
url => ' inheriturlfromparent03' ,
717
717
};
718
718
my $iufpAsset3 = $iufpAsset2 -> addChild($properties3 , $properties3 -> {id });
719
- addToCleanup( $iufpAsset3 );
719
+ WebGUI::Test -> addToCleanup( $iufpAsset3 );
720
720
$iufpAsset3 -> commit;
721
721
$iufpAsset2 -> update( { inheritUrlFromParent => 1 } );
722
722
$iufpAsset2 -> commit;
@@ -741,7 +741,7 @@ my $assetToCommit = $defaultAsset->addChild({
741
741
status => " pending" ,
742
742
tagId => $cloneTag -> getId,
743
743
});
744
- addToCleanup($cloneTag );
744
+ WebGUI::Test -> addToCleanup($cloneTag );
745
745
$cloneTag -> commit;
746
746
is($assetToCommit -> get(' status' ), ' pending' , ' cloneFromDb: local asset is still pending' );
747
747
$assetToCommit = $assetToCommit -> cloneFromDb;
@@ -760,7 +760,7 @@ my $trashedAsset = $defaultAsset->addChild({
760
760
my $clippedAsset = $defaultAsset -> addChild({
761
761
className => ' WebGUI::Asset::Snippet' , title => ' Clippy' ,
762
762
});
763
- addToCleanup( $trashedAsset , $clippedAsset );
763
+ WebGUI::Test -> addToCleanup( $trashedAsset , $clippedAsset );
764
764
$trashedAsset = $trashedAsset -> cloneFromDb;
765
765
$clippedAsset = $clippedAsset -> cloneFromDb;
766
766
$trashedAsset -> trash;
@@ -800,7 +800,7 @@ use HTML::Packer;
800
800
my $asset = WebGUI::Asset-> getImportNode( $session )-> addChild({
801
801
className => ' WebGUI::Asset::Snippet' ,
802
802
});
803
- addToCleanup( $asset );
803
+ WebGUI::Test -> addToCleanup( $asset );
804
804
my $unpacked = qq{ <title>
805
805
806
806
0 commit comments