add "asset" property to AssetHelpers.

Simplifies the API and allows us to have getForm and getUrl to make
asset helpers easier to build.
This commit is contained in:
Doug Bell 2011-03-25 14:49:44 -05:00
parent df31c13e13
commit 698f40a6dd
23 changed files with 216 additions and 123 deletions

View file

@ -37,13 +37,13 @@ plan tests => 2; # Increment this number for each test you create
my $output;
$session->setting->set( "versionTagMode" => "autoCommit" );
my $helper = WebGUI::AssetHelper::Duplicate->new( id => 'duplicate', session => $session );
my $root = WebGUI::Test->asset;
my $test = $root->addChild( { className => 'WebGUI::Asset::Snippet' } );
my $helper = WebGUI::AssetHelper::Duplicate->new( id => 'duplicate', session => $session, asset => $test );
{
$output = $helper->process($test);
$output = $helper->process;
cmp_deeply(
$output,
{