Merge branch 'WebGUI8' into psgi

Conflicts:
	sbin/testEnvironment.pl
This commit is contained in:
Patrick Donelan 2010-06-04 21:01:03 -04:00
commit f16ba76b86
109 changed files with 1546 additions and 2197 deletions

View file

@ -15,9 +15,14 @@ package WebGUI::Asset::RssAspectDummy;
=cut
use strict;
use Tie::IxHash;
use Class::C3;
use base qw/WebGUI::AssetAspect::RssFeed WebGUI::Asset/;
use Moose;
use WebGUI::Definition::Asset;
extends 'WebGUI::Asset';
define assetName => 'RssAspectDummy';
define icon => 'asset.gif';
with 'WebGUI::Role::Asset::RssFeed';
=head1 NAME
@ -25,7 +30,7 @@ Package WebGUI::Asset::RssAspectDummy
=head1 DESCRIPTION
A dummy module for testing the RssAspect. The module really doesn't
A dummy module for testing the Rss Role. The module really doesn't
do anything, except provide suport modules for testing.
The module inherits directly from WebGUI::Asset.

View file

@ -225,20 +225,20 @@ sub _mockAssetInits {
if $mockedNew;
require WebGUI::Asset;
my $original_new = \&WebGUI::Asset::new;
*WebGUI::Asset::new = sub {
my ($class, $session, $assetId, $className, $revisionDate) = @_;
if ($mockedAssetIds{$assetId}) {
return $mockedAssetIds{$assetId};
}
goto $original_new;
};
my $original_newByDynamicClass = \&WebGUI::Asset::newByDynamicClass;
*WebGUI::Asset::newByDynamicClass = sub {
# *WebGUI::Asset::new = sub {
# my ($class, $session, $assetId, $className, $revisionDate) = @_;
# if ($mockedAssetIds{$assetId}) {
# return $mockedAssetIds{$assetId};
# }
# goto $original_new;
# };
my $original_newById = \&WebGUI::Asset::newById;
*WebGUI::Asset::newById = sub {
my ($class, $session, $assetId, $revisionDate) = @_;
if ($mockedAssetIds{$assetId}) {
return $mockedAssetIds{$assetId};
}
goto $original_newByDynamicClass;
goto $original_newById;
};
my $original_newPending = \&WebGUI::Asset::newPending;
*WebGUI::Asset::newPending = sub {
@ -248,6 +248,14 @@ sub _mockAssetInits {
}
goto $original_newPending;
};
my $original_newByPropertyHashRef = \&WebGUI::Asset::newByPropertyHashRef;
*WebGUI::Asset::newByPropertyHashRef = sub {
my ($class, $session, $url, $revisionDate) = @_;
if ($url && $mockedAssetUrls{$url}) {
return $mockedAssetUrls{$url};
}
goto $original_newByPropertyHashRef;
};
my $original_newByUrl = \&WebGUI::Asset::newByUrl;
*WebGUI::Asset::newByUrl = sub {
my ($class, $session, $url, $revisionDate) = @_;
@ -473,6 +481,25 @@ sub webguiBirthday {
#----------------------------------------------------------------------------
=head2 getAssetSkipCoda ( )
Coded here for the sake of consistency, this returns everything that should be
appended to calls to addChild to autogenerate ids, revisionDates, and to skip
autoCommit workflows, and notifications.
=cut
sub getAssetSkipCoda {
return undef,
undef,
{
skipAutoCommitWorkflows => 1,
skipNotification => 1,
};
}
#----------------------------------------------------------------------------
=head2 getSmokeLDAPProps ( )
Returns a hashref of properties for connecting to smoke's LDAP server.
@ -790,6 +817,10 @@ Example call:
my ($class, $ident) = @_;
return $class->new($CLASS->session, $ident);
},
'WebGUI::Asset' => sub {
my ($class, $ident) = @_;
return WebGUI::Asset->newPending($CLASS->session, $ident);
},
'WebGUI::Storage' => sub {
my ($class, $ident) = @_;
return WebGUI::Storage->get($CLASS->session, $ident);