Refactor out synopsis code from Post to make a new AssetAspect. Have the WikiPage start using it, and assigning synopses to pages.
This commit is contained in:
parent
5ee5c910d8
commit
79fea5bb76
5 changed files with 117 additions and 76 deletions
|
|
@ -32,7 +32,11 @@ use WebGUI::Storage;
|
||||||
use WebGUI::User;
|
use WebGUI::User;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
use WebGUI::VersionTag;
|
use WebGUI::VersionTag;
|
||||||
our @ISA = qw(WebGUI::Asset);
|
use Class::C3;
|
||||||
|
use base qw(
|
||||||
|
WebGUI::AssetAspect::AutoSynopsis
|
||||||
|
WebGUI::Asset
|
||||||
|
);
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -86,7 +90,7 @@ sub addChild {
|
||||||
$self->session->errorHandler->security("add a ".$properties->{className}." to a ".$self->get("className"));
|
$self->session->errorHandler->security("add a ".$properties->{className}." to a ".$self->get("className"));
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
return $self->SUPER::addChild($properties, @other);
|
return $self->next::method($properties, @other);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -99,7 +103,7 @@ Override the default method in order to deal with attachments.
|
||||||
|
|
||||||
sub addRevision {
|
sub addRevision {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $newSelf = $self->SUPER::addRevision(@_);
|
my $newSelf = $self->next::method(@_);
|
||||||
if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) {
|
if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) {
|
||||||
my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy;
|
my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy;
|
||||||
$newSelf->update({storageId=>$newStorage->getId});
|
$newSelf->update({storageId=>$newStorage->getId});
|
||||||
|
|
@ -130,7 +134,7 @@ Extend the master class to make the default group 7.
|
||||||
sub canAdd {
|
sub canAdd {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
$class->SUPER::canAdd($session, undef, '7');
|
$class->next::method($session, undef, '7');
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -229,7 +233,7 @@ increment replies for the parent thread.
|
||||||
|
|
||||||
sub commit {
|
sub commit {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::commit;
|
$self->next::method;
|
||||||
|
|
||||||
$self->notifySubscribers unless ($self->shouldSkipNotification);
|
$self->notifySubscribers unless ($self->shouldSkipNotification);
|
||||||
|
|
||||||
|
|
@ -259,7 +263,7 @@ sub cut {
|
||||||
my $cs = $thread->getParent;
|
my $cs = $thread->getParent;
|
||||||
|
|
||||||
# Cut the asset
|
# Cut the asset
|
||||||
my $result = $self->SUPER::cut;
|
my $result = $self->next::method;
|
||||||
|
|
||||||
# If a post is being cut update the thread reply count first
|
# If a post is being cut update the thread reply count first
|
||||||
if ($thread->getId ne $self->getId) {
|
if ($thread->getId ne $self->getId) {
|
||||||
|
|
@ -347,7 +351,7 @@ sub definition {
|
||||||
className=>'WebGUI::Asset::Post',
|
className=>'WebGUI::Asset::Post',
|
||||||
properties=>$properties,
|
properties=>$properties,
|
||||||
});
|
});
|
||||||
return $class->SUPER::definition($session,$definition);
|
return $class->next::method($session,$definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -362,7 +366,7 @@ Extend the base method to delete the locally cached thread object.
|
||||||
sub DESTROY {
|
sub DESTROY {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/);
|
$self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/);
|
||||||
$self->SUPER::DESTROY;
|
$self->next::method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -376,7 +380,7 @@ Extend the base class to handle storage locations.
|
||||||
|
|
||||||
sub exportAssetData {
|
sub exportAssetData {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $data = $self->SUPER::exportAssetData;
|
my $data = $self->next::method;
|
||||||
push(@{$data->{storage}}, $self->get("storageId")) if ($self->get("storageId") ne "");
|
push(@{$data->{storage}}, $self->get("storageId")) if ($self->get("storageId") ne "");
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
@ -398,7 +402,7 @@ sub fixUrl {
|
||||||
my $url = shift;
|
my $url = shift;
|
||||||
$url =~ s/\./_/g;
|
$url =~ s/\./_/g;
|
||||||
|
|
||||||
$self->SUPER::fixUrl($url);
|
$self->next::method($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -655,49 +659,6 @@ sub getStorageLocation {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 getSynopsisAndContent ($synopsis, $body)
|
|
||||||
|
|
||||||
Returns a synopsis taken from the body of the Post, based on either the separator
|
|
||||||
macro, the first html paragraph, or the first physical line of text as defined by
|
|
||||||
newlines.
|
|
||||||
|
|
||||||
Returns both the synopsis, and the original body content.
|
|
||||||
|
|
||||||
=head3 $synopsis
|
|
||||||
|
|
||||||
If passed in, it returns that instead of the calculated synopsis.
|
|
||||||
|
|
||||||
=head3 $body
|
|
||||||
|
|
||||||
Body of the Post to use a source for the synopsis.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub getSynopsisAndContent {
|
|
||||||
my $self = shift;
|
|
||||||
my $synopsis = shift;
|
|
||||||
my $body = shift;
|
|
||||||
unless ($synopsis) {
|
|
||||||
my @content;
|
|
||||||
if( $body =~ /\^\-\;/ ) {
|
|
||||||
my @pieces = WebGUI::HTML::splitSeparator($body);
|
|
||||||
$content[0] = shift @pieces;
|
|
||||||
$content[1] = join '', @pieces;
|
|
||||||
}
|
|
||||||
elsif( $body =~ /<p>/ ) {
|
|
||||||
@content = WebGUI::HTML::splitTag($body);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
@content = split("\n",$body);
|
|
||||||
}
|
|
||||||
shift @content if $content[0] =~ /^\s*$/;
|
|
||||||
$synopsis = WebGUI::HTML::filter($content[0],"all");
|
|
||||||
}
|
|
||||||
return ($synopsis,$body);
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 getTemplateMetadataVars ( $var )
|
=head2 getTemplateMetadataVars ( $var )
|
||||||
|
|
||||||
Append metadata as template variables.
|
Append metadata as template variables.
|
||||||
|
|
@ -871,7 +832,7 @@ Indexing the content of attachments and user defined fields. See WebGUI::Asset::
|
||||||
|
|
||||||
sub indexContent {
|
sub indexContent {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $indexer = $self->SUPER::indexContent;
|
my $indexer = $self->next::method;
|
||||||
$indexer->addKeywords($self->get("content"));
|
$indexer->addKeywords($self->get("content"));
|
||||||
$indexer->addKeywords($self->get("userDefined1"));
|
$indexer->addKeywords($self->get("userDefined1"));
|
||||||
$indexer->addKeywords($self->get("userDefined2"));
|
$indexer->addKeywords($self->get("userDefined2"));
|
||||||
|
|
@ -1058,7 +1019,7 @@ Extends the master method to handle incrementing replies.
|
||||||
sub paste {
|
sub paste {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
$self->SUPER::paste(@_);
|
$self->next::method(@_);
|
||||||
|
|
||||||
# First, figure out what Thread we're under
|
# First, figure out what Thread we're under
|
||||||
my $thread = $self->getLineage( [ qw{ self ancestors } ], {
|
my $thread = $self->getLineage( [ qw{ self ancestors } ], {
|
||||||
|
|
@ -1103,7 +1064,7 @@ non-sticky, locking and unlocking posts. Calls postProcess when it is done.
|
||||||
|
|
||||||
sub processPropertiesFromFormPost {
|
sub processPropertiesFromFormPost {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::processPropertiesFromFormPost;
|
$self->next::method;
|
||||||
my $session = $self->session;
|
my $session = $self->session;
|
||||||
my $form = $session->form;
|
my $form = $session->form;
|
||||||
my $i18n = WebGUI::International->new($session);
|
my $i18n = WebGUI::International->new($session);
|
||||||
|
|
@ -1184,15 +1145,6 @@ sub postProcess {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
#sub publish {
|
|
||||||
# my $self = shift;
|
|
||||||
# $self->SUPER::publish(@_);
|
|
||||||
#
|
|
||||||
# $self->getThread->sumReplies;
|
|
||||||
#}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 purge
|
=head2 purge
|
||||||
|
|
||||||
Extend the base method to handle cleaning up storage locations.
|
Extend the base method to handle cleaning up storage locations.
|
||||||
|
|
@ -1207,7 +1159,7 @@ sub purge {
|
||||||
$storage->delete if defined $storage;
|
$storage->delete if defined $storage;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
return $self->SUPER::purge;
|
return $self->next::method;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -1221,7 +1173,7 @@ Extend the base class to handle caching.
|
||||||
sub purgeCache {
|
sub purgeCache {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
WebGUI::Cache->new($self->session,"view_".$self->getThread->getId)->delete if ($self->getThread);
|
WebGUI::Cache->new($self->session,"view_".$self->getThread->getId)->delete if ($self->getThread);
|
||||||
$self->SUPER::purgeCache;
|
$self->next::method;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -1235,7 +1187,7 @@ Extend the base method to handle deleting the storage location.
|
||||||
sub purgeRevision {
|
sub purgeRevision {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->getStorageLocation->delete;
|
$self->getStorageLocation->delete;
|
||||||
return $self->SUPER::purgeRevision;
|
return $self->next::method;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1295,7 +1247,7 @@ the thread rating.
|
||||||
|
|
||||||
sub restore {
|
sub restore {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::restore(@_);
|
$self->next::method(@_);
|
||||||
$self->getThread->sumReplies;
|
$self->getThread->sumReplies;
|
||||||
$self->getThread->updateThreadRating;
|
$self->getThread->updateThreadRating;
|
||||||
}
|
}
|
||||||
|
|
@ -1336,7 +1288,7 @@ sub setParent {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $newParent = shift;
|
my $newParent = shift;
|
||||||
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Post" || $newParent->get("className") eq "WebGUI::Asset::Post::Thread");
|
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Post" || $newParent->get("className") eq "WebGUI::Asset::Post::Thread");
|
||||||
return $self->SUPER::setParent($newParent);
|
return $self->next::method($newParent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1379,7 +1331,7 @@ Moves post to the trash, updates reply counter on thread and recalculates the th
|
||||||
|
|
||||||
sub trash {
|
sub trash {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::trash;
|
$self->next::method;
|
||||||
$self->getThread->sumReplies if ($self->isReply);
|
$self->getThread->sumReplies if ($self->isReply);
|
||||||
$self->getThread->updateThreadRating;
|
$self->getThread->updateThreadRating;
|
||||||
if ($self->getThread->get("lastPostId") eq $self->getId) {
|
if ($self->getThread->get("lastPostId") eq $self->getId) {
|
||||||
|
|
@ -1414,7 +1366,7 @@ sub update {
|
||||||
view => $self->get("groupIdView"),
|
view => $self->get("groupIdView"),
|
||||||
edit => $self->get("groupIdEdit")
|
edit => $self->get("groupIdEdit")
|
||||||
);
|
);
|
||||||
$self->SUPER::update({%$properties, isHidden => 1});
|
$self->next::method({%$properties, isHidden => 1});
|
||||||
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
||||||
my $storage = $self->getStorageLocation;
|
my $storage = $self->getStorageLocation;
|
||||||
if (-d $storage->getPath) {
|
if (-d $storage->getPath) {
|
||||||
|
|
@ -1433,7 +1385,7 @@ Extend the base method to also prepare the Thread containing this Post.
|
||||||
|
|
||||||
sub prepareView {
|
sub prepareView {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->SUPER::prepareView;
|
$self->next::method;
|
||||||
unless ($self->getThread->getId eq $self->getId) {
|
unless ($self->getThread->getId eq $self->getId) {
|
||||||
# Need the unless to avoid infinite recursion.
|
# Need the unless to avoid infinite recursion.
|
||||||
$self->getThread->prepareView;
|
$self->getThread->prepareView;
|
||||||
|
|
@ -1801,7 +1753,7 @@ sub www_editSave {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $output = $self->SUPER::www_editSave();
|
my $output = $self->next::method();
|
||||||
if ($currentTag) { # Go back to our original tag
|
if ($currentTag) { # Go back to our original tag
|
||||||
$currentTag->setWorking;
|
$currentTag->setWorking;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use Class::C3;
|
||||||
use base qw(
|
use base qw(
|
||||||
WebGUI::AssetAspect::Subscribable
|
WebGUI::AssetAspect::Subscribable
|
||||||
WebGUI::AssetAspect::Comments
|
WebGUI::AssetAspect::Comments
|
||||||
|
WebGUI::AssetAspect::AutoSynopsis
|
||||||
WebGUI::Asset
|
WebGUI::Asset
|
||||||
);
|
);
|
||||||
use Tie::IxHash;
|
use Tie::IxHash;
|
||||||
|
|
@ -420,6 +421,8 @@ sub processPropertiesFromFormPost {
|
||||||
$properties->{isFeatured} = $session->form->get("isFeatured");
|
$properties->{isFeatured} = $session->form->get("isFeatured");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
($properties->{synopsis}) = $self->getSynopsisAndContent(undef, $self->get('content'));
|
||||||
|
|
||||||
$self->update($properties);
|
$self->update($properties);
|
||||||
|
|
||||||
# deal with attachments from the attachments form control
|
# deal with attachments from the attachments form control
|
||||||
|
|
@ -473,6 +476,7 @@ sub scrubContent {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $content = shift || $self->get("content");
|
my $content = shift || $self->get("content");
|
||||||
|
|
||||||
|
$content =~ s/\^-\;//g;
|
||||||
my $scrubbedContent = WebGUI::HTML::filter($content, $self->getWiki->get("filterCode"));
|
my $scrubbedContent = WebGUI::HTML::filter($content, $self->getWiki->get("filterCode"));
|
||||||
|
|
||||||
if ($self->getWiki->get("useContentFilter")) {
|
if ($self->getWiki->get("useContentFilter")) {
|
||||||
|
|
|
||||||
83
lib/WebGUI/AssetAspect/AutoSynopsis.pm
Normal file
83
lib/WebGUI/AssetAspect/AutoSynopsis.pm
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
package WebGUI::AssetAspect::AutoSynopsis;
|
||||||
|
|
||||||
|
=head1 LEGAL
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Please read the legal notices (docs/legal.txt) and the license
|
||||||
|
(docs/license.txt) that came with this distribution before using
|
||||||
|
this software.
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
http://www.plainblack.com info@plainblack.com
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Class::C3;
|
||||||
|
use WebGUI::HTML;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::AssetAspect::AutoSynopsis
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
This is an aspect which provides a method for an asset to create a synopsis based on user submitted content.
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use Class::C3;
|
||||||
|
use base qw(WebGUI::AssetAspect::AutoSynopsis WebGUI::Asset);
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
These methods are available from this class:
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 getSynopsisAndContent ($synopsis, $body)
|
||||||
|
|
||||||
|
Returns a synopsis taken from the body of the Post, based on either the separator
|
||||||
|
macro, the first html paragraph, or the first physical line of text as defined by
|
||||||
|
newlines.
|
||||||
|
|
||||||
|
Returns both the synopsis, and the original body content.
|
||||||
|
|
||||||
|
=head3 $synopsis
|
||||||
|
|
||||||
|
If passed in, it returns that instead of the calculated synopsis.
|
||||||
|
|
||||||
|
=head3 $body
|
||||||
|
|
||||||
|
Body of the Post to use a source for the synopsis.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub getSynopsisAndContent {
|
||||||
|
my $self = shift;
|
||||||
|
my $synopsis = shift;
|
||||||
|
my $body = shift;
|
||||||
|
unless ($synopsis) {
|
||||||
|
my @content;
|
||||||
|
if( $body =~ /\^\-\;/ ) {
|
||||||
|
my @pieces = WebGUI::HTML::splitSeparator($body);
|
||||||
|
$content[0] = shift @pieces;
|
||||||
|
$content[1] = join '', @pieces;
|
||||||
|
}
|
||||||
|
elsif( $body =~ /<p>/ ) {
|
||||||
|
@content = WebGUI::HTML::splitTag($body);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@content = split("\n",$body);
|
||||||
|
}
|
||||||
|
shift @content if $content[0] =~ /^\s*$/;
|
||||||
|
$synopsis = WebGUI::HTML::filter($content[0],"all");
|
||||||
|
}
|
||||||
|
return ($synopsis,$body);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
@ -19,7 +19,7 @@ use strict;
|
||||||
use lib "$FindBin::Bin/../lib";
|
use lib "$FindBin::Bin/../lib";
|
||||||
use WebGUI::Test;
|
use WebGUI::Test;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
use Test::More tests => 16; # increment this value for each test you create
|
use Test::More tests => 17; # increment this value for each test you create
|
||||||
use WebGUI::Asset::Wobject::Collaboration;
|
use WebGUI::Asset::Wobject::Collaboration;
|
||||||
use WebGUI::Asset::Post;
|
use WebGUI::Asset::Post;
|
||||||
use WebGUI::Asset::Post::Thread;
|
use WebGUI::Asset::Post::Thread;
|
||||||
|
|
@ -113,6 +113,7 @@ ok($post->canEdit(), "User in groupIdEditUserGroup group can edit post after the
|
||||||
#
|
#
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
can_ok($post, 'getSynopsisAndContent');
|
||||||
my ($synopsis, $content) = $post->getSynopsisAndContent('', q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |);
|
my ($synopsis, $content) = $post->getSynopsisAndContent('', q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |);
|
||||||
is($synopsis, q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |, 'getSynopsisAndContent: UTF8 characters okay');
|
is($synopsis, q|Brandheiße Neuigkeiten rund um's Klettern für euch aus der Region |, 'getSynopsisAndContent: UTF8 characters okay');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use lib "$FindBin::Bin/../lib";
|
||||||
|
|
||||||
use WebGUI::Test;
|
use WebGUI::Test;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
use Test::More tests => 17; # increment this value for each test you create
|
use Test::More tests => 18; # increment this value for each test you create
|
||||||
use Test::Deep;
|
use Test::Deep;
|
||||||
use WebGUI::Asset::Wobject::WikiMaster;
|
use WebGUI::Asset::Wobject::WikiMaster;
|
||||||
use WebGUI::Asset::WikiPage;
|
use WebGUI::Asset::WikiPage;
|
||||||
|
|
@ -91,3 +91,4 @@ $comments = $wikipage->get('comments');
|
||||||
is($comments->[0]{comment}, $secondComment, "you can delete a comment");
|
is($comments->[0]{comment}, $secondComment, "you can delete a comment");
|
||||||
is($wikipage->get('averageCommentRating'), 1, 'average rating is adjusted after deleting a comment');
|
is($wikipage->get('averageCommentRating'), 1, 'average rating is adjusted after deleting a comment');
|
||||||
|
|
||||||
|
can_ok($wikipage, 'getSynopsisAndContent');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue