From ea10fc30477a5385bcf8210c2f618ff4993c06cf Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 31 Dec 2007 05:21:00 +0000 Subject: [PATCH] Add tests for getName. Note that the coverage tests said this was already covered, even though there were no direct tests for it. This is because it's called by other methods. --- t/Asset/Asset.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/Asset/Asset.t b/t/Asset/Asset.t index e1187bbd8..40d3d4d42 100644 --- a/t/Asset/Asset.t +++ b/t/Asset/Asset.t @@ -134,7 +134,7 @@ $canViewMaker->prepare( }, ); -plan tests => 61 +plan tests => 64 + scalar(@fixIdTests) + scalar(@fixTitleTests) + $canAddMaker->plan @@ -487,6 +487,16 @@ ok($addMissing, 'addMissing returns some output when in Admin Mode'); is($rootAsset->getContainer->getId, $rootAsset->getId, 'getContainer: A folder is a container, its container is itself'); is($fixTitleAsset->getContainer->getId, $defaultAsset->getId, 'getContainer: A snippet is not a container, its container is its parent'); +################################################################ +# +# getName +# +################################################################ + +is($fixTitleAsset->getName, $i18n->get('assetName', 'Asset_Snippet'), 'getName: Returns the internationalized name of the Asset, Snippet'); +is($importNode->getName, $i18n->get('assetName', 'Asset_Folder'), 'getName: Returns the internationalized name of the Asset, Folder'); +is($canEditAsset->getName, $i18n->get('asset', 'Asset'), 'getName: Returns the internationalized name of the Asset, core Asset'); + END: { $session->config->set('extrasURL', $origExtras); $session->config->set('uploadsURL', $origUploads);