Merge branch 'master' into WebGUI8. Merged up to 7.10.4

This commit is contained in:
Colin Kuskie 2010-11-03 09:47:36 -07:00
commit 5f3014aaee
66 changed files with 3078 additions and 997 deletions

View file

@ -40,8 +40,8 @@ use List::MoreUtils qw(any);
use File::Copy ();
use File::Temp ();
use Try::Tiny;
use Monkey::Patch qw( patch_object );
use Scope::Guard;
use Try::Tiny;
use WebGUI::Paths -inc;
use namespace::clean;
@ -537,6 +537,26 @@ sub originalConfig {
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
=head2 overrideSetting (name, val)
Overrides WebGUI::Test->session->setting->get($name) to return $val until the
handle this method returns goes out of scope.
=cut
sub overrideSetting {
my ($class, $name, $val) = @_;
patch_object $class->session->setting => get => sub {
my $get = shift;
return $val if $_[1] eq $name;
goto &$get;
};
}
#----------------------------------------------------------------------------
=head2 cleanupAdminInbox ( )
Push a list of Asset objects onto the stack of assets to be automatically purged