diff --git a/t/Asset/AssetLineage.t b/t/Asset/AssetLineage.t index a0e021f77..4ea371595 100644 --- a/t/Asset/AssetLineage.t +++ b/t/Asset/AssetLineage.t @@ -184,12 +184,12 @@ is( # #################################################### -#diag $snippets[0]->get('lineage'); -#diag $snippet2->get('lineage'); +#note $snippets[0]->get('lineage'); +#note $snippet2->get('lineage'); ##Uncomment me to crash the test #$snippet2->cascadeLineage($snippets[0]->get('lineage')); -#diag $snippets[0]->get('lineage'); -#diag $snippet2->get('lineage'); +#note $snippets[0]->get('lineage'); +#note $snippet2->get('lineage'); #################################################### # diff --git a/t/Asset/AssetVersion.t b/t/Asset/AssetVersion.t index bb1193bb7..64baa28b0 100644 --- a/t/Asset/AssetVersion.t +++ b/t/Asset/AssetVersion.t @@ -43,7 +43,7 @@ my $originalVersionTags = $session->db->quickScalar(q{select count(*) from asset # ################################################################ -diag "purgeRevision tests"; +note "purgeRevision tests"; my $template = $root->addChild($propertyHash); $template->commit; @@ -93,7 +93,7 @@ $templatev2 = $template->addRevision({template => 'Vie gates. Ich bin ein templ my $tag2 = WebGUI::VersionTag->getWorking($session); $tag2->commit; WebGUI::Test->tagsToRollback($tag2); -diag "purge"; +note "purge"; checkTableEntries($templatev2->getId, 1,2,2); $versionTagCheck = $session->db->quickScalar(q{select count(*) from assetVersionTag}); is($versionTagCheck, $originalVersionTags+2, 'created two version tags'); diff --git a/t/Asset/File/GalleryFile/Photo/makeResolutions.t b/t/Asset/File/GalleryFile/Photo/makeResolutions.t index aea2b61de..415124e38 100644 --- a/t/Asset/File/GalleryFile/Photo/makeResolutions.t +++ b/t/Asset/File/GalleryFile/Photo/makeResolutions.t @@ -69,7 +69,8 @@ ok( eval{ $photo->makeResolutions; 1 }, "makeResolutions succeeds when photo under photo gallery and no resolution given", ); -diag( $@ ); +diag( $@ ) + if $@; cmp_deeply( $photo->getStorageLocation->getFiles, @@ -121,7 +122,8 @@ ok( eval{ $photo->makeResolutions(['100x100','200x200']); 1 }, "makeResolutions succeeds when first argument is array reference of resolutions to make", ); -diag( $@ ); +diag( $@ ) + if $@; is_deeply( [ sort({ $a cmp $b} @{ $photo->getStorageLocation->getFiles }) ], @@ -194,7 +196,8 @@ $photo->update({ filename => 'page_title.jpg' }); eval{ $photo->makeResolutions(['abc','200','3d400']); 1 }, "makeResolutions succeeds when invalid resolutions are given", ); - diag( $@ ); + diag( $@ ) + if $@; is( scalar @warnings, 2, diff --git a/t/Asset/JSONCollateral.t b/t/Asset/JSONCollateral.t index 597f4b018..013debaf0 100644 --- a/t/Asset/JSONCollateral.t +++ b/t/Asset/JSONCollateral.t @@ -344,7 +344,7 @@ cmp_deeply( '...collateral was removed' ); -diag $asset->getId; +note $asset->getId; $tag->rollback; diff --git a/t/Asset/Story.t b/t/Asset/Story.t index bec081e02..92564f745 100644 --- a/t/Asset/Story.t +++ b/t/Asset/Story.t @@ -324,7 +324,7 @@ $story->setPhotoData([ my $viewVariables = $story->viewTemplateVariables; -#diag Dumper $viewVariables; +#note explain $viewVariables; cmp_deeply( $viewVariables->{highlights_loop}, [ diff --git a/t/Asset/Wobject/Calendar.t b/t/Asset/Wobject/Calendar.t index 11e7dd9b8..93259c667 100644 --- a/t/Asset/Wobject/Calendar.t +++ b/t/Asset/Wobject/Calendar.t @@ -219,9 +219,9 @@ is(scalar @{ $windowCal->getLineage(['children'])}, 9, 'added events to the wind my @window = $windowCal->getEventsIn($startDt->toDatabase, $endDt->toDatabase); -#diag $startDt->toDatabase; -#diag join "\n", map { join ' ', $_->get('title'), $_->get('startDate'), $_->get('startTime')} @window; -#diag $endDt->toDatabase; +#note $startDt->toDatabase; +#note join "\n", map { join ' ', $_->get('title'), $_->get('startDate'), $_->get('startTime')} @window; +#note $endDt->toDatabase; is(scalar @window, 4, 'getEventsIn returned 4 events'); cmp_bag( diff --git a/t/Asset/Wobject/Collaboration.t b/t/Asset/Wobject/Collaboration.t index 96209389e..e9c5fd318 100644 --- a/t/Asset/Wobject/Collaboration.t +++ b/t/Asset/Wobject/Collaboration.t @@ -94,7 +94,7 @@ $post = $collab->addChild($props, my $rssitems = $collab->getRssFeedItems(); is(scalar @{ $rssitems }, 2, 'rssitems set to number of posts added'); -diag "AssetAspect tests"; +note "AssetAspect tests"; is($collab->getRssFeedUrl, '/collab?func=viewRss', 'getRssFeedUrl'); is($collab->getRdfFeedUrl, '/collab?func=viewRdf', 'getRdfFeedUrl'); is($collab->getAtomFeedUrl, '/collab?func=viewAtom', 'getAtomFeedUrl'); diff --git a/t/Asset/Wobject/GalleryAlbum/rss.t b/t/Asset/Wobject/GalleryAlbum/rss.t index 47337bbc3..08852634b 100644 --- a/t/Asset/Wobject/GalleryAlbum/rss.t +++ b/t/Asset/Wobject/GalleryAlbum/rss.t @@ -50,8 +50,8 @@ my $album { skipAutoCommitWorkflows => 1, }); -diag $album->get('title'); -diag $album->get('description'); +note $album->get('title'); +note $album->get('description'); my @photos; for my $i ( 0 .. 5 ) { $photos[ $i ] diff --git a/t/Asset/Wobject/Poll.t b/t/Asset/Wobject/Poll.t index 500416d15..4cfdfd624 100644 --- a/t/Asset/Wobject/Poll.t +++ b/t/Asset/Wobject/Poll.t @@ -106,7 +106,7 @@ my $uploadsPath = Path::Class::Dir->new($session->config->get('uploadsPath')); my $uploadsUrl = Path::Class::Dir->new($session->config->get('uploadsURL')); my $graphRelative = $graphUrl->relative($uploadsUrl); my $graphFile = $uploadsPath->file($graphRelative); -diag $graphFile->stringify; +note $graphFile->stringify; ok(-e $graphFile->stringify, 'graph exists'); diff --git a/t/DatabaseLink.t b/t/DatabaseLink.t index 5820f46dc..d31561cb7 100644 --- a/t/DatabaseLink.t +++ b/t/DatabaseLink.t @@ -237,7 +237,7 @@ is(WebGUI::DatabaseLink->new($session,'foobar'), undef, 'new returns undef with # #################################################### -diag 'queryIsValid'; +note 'queryIsValid'; foreach my $query (@{ $queries }) { is($dbLink->queryIsAllowed($query->{query}), $query->{expect}, $query->{comment}); } diff --git a/t/Form/ClassName.t b/t/Form/ClassName.t index cb3012185..82c317951 100644 --- a/t/Form/ClassName.t +++ b/t/Form/ClassName.t @@ -118,7 +118,7 @@ is($input->value, 'WebGUI::Storage', 'Checking default value'); ##Test Form Output parsing -#diag $formType; +#note $formType; WebGUI::Form_Checking::auto_check($session, $formType, $testBlock); # diff --git a/t/Form/DynamicField.t b/t/Form/DynamicField.t index 404648b18..bb772f8c4 100644 --- a/t/Form/DynamicField.t +++ b/t/Form/DynamicField.t @@ -36,5 +36,5 @@ my $form = WebGUI::Form::DynamicField->new($session, fieldType => 'FormTest', ); -diag "Test loading a Form from a location outside of /data/WebGUI/lib/WebGUI"; +note "Test loading a Form from a location outside of /data/WebGUI/lib/WebGUI"; isa_ok($form, 'WebGUI::Form::FormTest'); diff --git a/t/HTML/splitSeparator.t b/t/HTML/splitSeparator.t index 3fa7c02db..c0ae59cc1 100644 --- a/t/HTML/splitSeparator.t +++ b/t/HTML/splitSeparator.t @@ -107,7 +107,7 @@ foreach my $testSet (@testArray) { $testSet->{comment} ); if (!$ok) { - diag Dumper \@output; + diag explain \@output; } } diff --git a/t/Inbox.t b/t/Inbox.t index b3b75613c..23a5d462b 100644 --- a/t/Inbox.t +++ b/t/Inbox.t @@ -128,8 +128,8 @@ is(scalar @{ $inbox->getMessagesForUser($admin, '', '', '', 'sentBy='.$session-> is($inbox->getUnreadMessageCount($admin->userId), 4, 'getUnreadMessageCount'); my $messages = $inbox->getMessagesForUser($admin); $messages->[0]->setRead($admin->userId); -diag $messages->[0]->getStatus; -diag $messages->[0]->isRead; +note $messages->[0]->getStatus; +note $messages->[0]->isRead; is($inbox->getUnreadMessageCount($admin->userId), 3, '... really tracks unread messages'); END { diff --git a/t/Macro/Splat_random.t b/t/Macro/Splat_random.t index 13a0676db..3326c9880 100644 --- a/t/Macro/Splat_random.t +++ b/t/Macro/Splat_random.t @@ -62,4 +62,4 @@ WHOLE: for (my $i=0; $i<=999; $i++) { is(scalar(@bins), 4, "All bins have values on a sample size of 1000"); -#diag Dumper \@bins; +#note explain \@bins; diff --git a/t/Operation/User/service.t b/t/Operation/User/service.t index dea26bd1b..26d89b6db 100644 --- a/t/Operation/User/service.t +++ b/t/Operation/User/service.t @@ -170,7 +170,7 @@ cmp_deeply( }), }, "Success response contains new users information", -) or diag( Dumper $responseObj ); +) or diag explain $responseObj; $userRed = WebGUI::User->new( $session, $responseObj->{user}->{userId} ); is( $userRed->get("username"), "EBRedding", "User exists and username is correct" ); $auth = WebGUI::Operation::Auth::getInstance( $session, 'WebGUI', $userRed->getId ); @@ -311,7 +311,7 @@ cmp_deeply( }), }, "Success response contains new users information", -) or diag( Dumper $responseObj ); +) or diag explain $responseObj; $userRed = WebGUI::User->new( $session, $responseObj->{user}->{userId} ); is( $userRed->get("username"), "EBRedding", "User exists and username is correct" ); $auth = WebGUI::Operation::Auth::getInstance( $session, 'WebGUI', $userRed->getId ); diff --git a/t/POD.t b/t/POD.t index 098d5da5d..5d08edd07 100644 --- a/t/POD.t +++ b/t/POD.t @@ -39,7 +39,7 @@ foreach my $package (sort @modules) { skip "No subroutines found by Devel::Symdump for $package", 1 if $goodReason; ok($coverage, sprintf "%s has %d%% POD coverage", $package, $pc->coverage*100); if (!$coverage && $ENV{POD_COVERAGE}) { - diag Dumper [$pc->naked]; + diag explain [$pc->naked]; diag $pc->why_unrated; } } diff --git a/t/PodChecker.t b/t/PodChecker.t index 785c6b55a..1502032d2 100644 --- a/t/PodChecker.t +++ b/t/PodChecker.t @@ -23,7 +23,7 @@ File::Find::find( \&getWebGUIModules, $wgLib); plan tests => scalar(@modules); -#diag("Planning on ".scalar(@modules)." tests"); +#note("Planning on ".scalar(@modules)." tests"); my %options; $options{-warnings} = 0; # report only errors for now diff --git a/t/Session/Scratch.t b/t/Session/Scratch.t index 2cea64f23..1b56afcbd 100644 --- a/t/Session/Scratch.t +++ b/t/Session/Scratch.t @@ -121,7 +121,7 @@ END { $session->scratch->deleteAll; foreach my $wgSess ($newSession, @sessionBank) { if (defined $wgSess and ref $wgSess eq 'WebGUI::Session') { - diag "Closing session"; + note "Closing session"; $wgSess->scratch->deleteAll; $wgSess->var->end; $wgSess->close; diff --git a/t/Shop/PayDriver/ITransact.t b/t/Shop/PayDriver/ITransact.t index 081d8eef1..44dd2256c 100644 --- a/t/Shop/PayDriver/ITransact.t +++ b/t/Shop/PayDriver/ITransact.t @@ -40,7 +40,7 @@ plan tests => 1 + $tests; #---------------------------------------------------------------------------- # figure out if the test can actually run -diag('Testing existence'); +note('Testing existence'); my $loaded = use_ok('WebGUI::Shop::PayDriver::ITransact'); my $e; @@ -96,7 +96,7 @@ skip 'Unable to load module WebGUI::Shop::PayDriver::ITransact', $tests unless $ # ####################################################################### -diag('Testing definition'); +note('Testing definition'); my $definition; eval { $definition = WebGUI::Shop::PayDriver::ITransact->definition(); }; @@ -294,7 +294,7 @@ TODO: { SKIP: { skip "Skipping XML requests to ITransact due to lack of userId and password", 2 unless $hasTestAccount; my $response = eval { $driver->doXmlRequest($xml) }; - diag 'doXmlrequest'; + note 'doXmlrequest'; isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); ok( $response->is_success, '... was successful'); } @@ -313,7 +313,7 @@ SKIP: { my $response = eval { $driver->doXmlRequest($xml) }; isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); ok( $response->is_success, '... was successful'); - diag $response->content; + note $response->content; } ####################################################################### diff --git a/t/Shop/PayDriver/Ogone.t b/t/Shop/PayDriver/Ogone.t index 83e36ffb9..b5f293415 100644 --- a/t/Shop/PayDriver/Ogone.t +++ b/t/Shop/PayDriver/Ogone.t @@ -39,7 +39,7 @@ plan tests => 1 + $tests; my $e; -diag('Testing existence'); +note('Testing existence'); my $loaded = use_ok('WebGUI::Shop::PayDriver::Ogone'); SKIP: { @@ -52,7 +52,7 @@ skip 'Unable to load module WebGUI::Shop::PayDriver::Ogone', $tests unless $load # ####################################################################### -diag('Testing definition'); +note('Testing definition'); my $definition; eval { $definition = WebGUI::Shop::PayDriver::Ogone->definition(); }; diff --git a/t/Shop/ShipDriver.t b/t/Shop/ShipDriver.t index 8b0455aa1..6e9be7cad 100644 --- a/t/Shop/ShipDriver.t +++ b/t/Shop/ShipDriver.t @@ -357,8 +357,7 @@ cmp_deeply( isa_ok( $driver->get(), 'HASH', 'get returns a hashref if called with no param'); -use Data::Dumper; -diag Dumper $driver->get(); +note explain $driver->get(); is($driver->get('groupToUse'), 7, '... default group is 7'); diff --git a/t/Shop/loadProductAssets.pl b/t/Shop/loadProductAssets.pl index b0245578b..c662d013b 100644 --- a/t/Shop/loadProductAssets.pl +++ b/t/Shop/loadProductAssets.pl @@ -81,4 +81,4 @@ my $template1 = $root->addChild($tProperties1); $tag->commit; -diag "Done."; +note "Done."; diff --git a/t/Shop/loadProducts.pl b/t/Shop/loadProducts.pl index 3e8288bda..5ee66c8fa 100644 --- a/t/Shop/loadProducts.pl +++ b/t/Shop/loadProducts.pl @@ -54,7 +54,7 @@ my $properties1 = { my $root = WebGUI::Asset->getRoot($session); my $product1 = $root->addChild($properties1); -diag ref $product1; +note ref $product1; my $properties2 = { className => 'WebGUI::Asset::Wobject::Product', @@ -67,7 +67,7 @@ my $properties2 = { my $product2 = $root->addChild($properties2); -diag ref $product2; +note ref $product2; $tag->commit; sleep 2; @@ -185,4 +185,4 @@ $productb->setCollateral('Product_benefit', 'Product_benefitId', { $tag->commit; -diag "Done."; +note "Done."; diff --git a/t/Storage.t b/t/Storage.t index ac5f3a1fa..cac8dd8eb 100644 --- a/t/Storage.t +++ b/t/Storage.t @@ -322,7 +322,7 @@ cmp_bag($s3copy->getFiles(), [ @filesToCopy ], 'copy: passing explicit variable my $deepDeepDir = $deepDir->subdir('deep'); my $errorStr; my @foo = $deepDeepDir->mkpath({ error => \$errorStr } ); - diag Dumper \@foo; + note explain \@foo; $deepStorage->addFileFromScalar('deep/file', 'deep file'); cmp_bag( $deepStorage->getFiles('all'), diff --git a/t/WebGUI_conf.t b/t/WebGUI_conf.t index 50a8c2642..f9d13d7b6 100644 --- a/t/WebGUI_conf.t +++ b/t/WebGUI_conf.t @@ -50,8 +50,6 @@ ok($jsonText, 'The file is not empty'); my $perlScalar; eval { $perlScalar = JSON->new->relaxed(1)->decode($jsonText) }; -diag $@; - if ($@) { my $index; ($index) = $@ =~ /character offset (\d+)/; diff --git a/t/Workflow/Activity/DeleteExpiredSessions.t b/t/Workflow/Activity/DeleteExpiredSessions.t index 8116e3280..2164ac6d9 100644 --- a/t/Workflow/Activity/DeleteExpiredSessions.t +++ b/t/Workflow/Activity/DeleteExpiredSessions.t @@ -52,8 +52,8 @@ my $origSessionTimeout = $session->setting->get('sessionTimeout'); my $sessionCount = $session->db->quickScalar('select count(*) from userSession'); my $scratchCount = $session->db->quickScalar('select count(*) from userSessionScratch'); -diag $sessionCount; -diag $scratchCount; +note $sessionCount; +note $scratchCount; my @sessions; diff --git a/t/badGatewayMacros.t b/t/badGatewayMacros.t index 20917979c..4fbbbeaf6 100644 --- a/t/badGatewayMacros.t +++ b/t/badGatewayMacros.t @@ -29,7 +29,7 @@ my $lib = WebGUI::Test->lib; ##Find the name of the International macro in the user's config file. -#diag "International macro name = $international"; +#note "International macro name = $international"; ##Regexp setup for parsing out the Macro calls. my $macro = qr{ diff --git a/t/mandatory_template_vars.t b/t/mandatory_template_vars.t index 7730778f3..cd85dbe59 100644 --- a/t/mandatory_template_vars.t +++ b/t/mandatory_template_vars.t @@ -161,7 +161,7 @@ foreach my $tmpl (@tmplVarTable) { plan tests => $numTests; -#diag("planning on $numTests tests"); +#note("planning on $numTests tests"); foreach my $tmpl ( @tmplVarTable ) { my $tmplId = $tmpl->{id}; diff --git a/t/rawHrefUrls.t b/t/rawHrefUrls.t index ae866606f..43f4dc428 100644 --- a/t/rawHrefUrls.t +++ b/t/rawHrefUrls.t @@ -30,7 +30,7 @@ my $lib = WebGUI::Test->lib; ##Find the name of the International macro in the user's config file. -#diag "International macro name = $international"; +#note "International macro name = $international"; ##Regexp setup for parsing out the Macro calls. my $macro = qr{