change AssetHelpers to have short IDs instead of class names

This will make better code reuse: The Asset Manager will instead
call the AssetHelper with the id of "cut" or "copy" to get the
correct operation.
This commit is contained in:
Doug Bell 2011-02-25 15:44:06 -06:00
parent f249070c50
commit b9e879b7aa
22 changed files with 156 additions and 115 deletions

View file

@ -81,10 +81,10 @@ $mech->get('/'); # Start a session
$mech->session->user({ userId => '3' });
# www_processAssetHelper
$mech->get_ok( '/?op=admin;method=processAssetHelper;className=WebGUI::AssetHelper::Cut;assetId=' . $snip->getId );
$mech->get_ok( '/?op=admin;method=processAssetHelper;helperId=cut;assetId=' . $snip->getId );
cmp_deeply(
JSON->new->decode( $mech->content ),
WebGUI::AssetHelper::Cut->process( $snip ),
WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session )->process( $snip ),
'www_processAssetHelper',
);