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

@ -30,7 +30,6 @@ my $session = WebGUI::Test->session;
$session->user({ userId => 3 });
my $output;
my $helper = WebGUI::AssetHelper::ExportHtml->new( id => 'export_html', session => $session );
my $node = WebGUI::Asset->getImportNode($session);
my $root = WebGUI::Asset->getRoot( $session );
my $top = $node->addChild({
@ -62,7 +61,7 @@ WebGUI::Test->config->set( "exportPath" => $dir->dirname );
# Tests
{
my $helper = WebGUI::AssetHelper::ExportHtml->new( id => 'export_html', session => $session, asset => $top );
$output = $helper->process($top);
cmp_deeply(
$output,