Merge pull request #451 from andrewandante/FIX/tests

total refactor of blog.yml for tests, use classes properly
This commit is contained in:
Daniel Hensby 2017-07-05 14:09:55 +01:00 committed by GitHub
commit 6c1e6a98c4
8 changed files with 237 additions and 360 deletions

View File

@ -54,12 +54,12 @@ class BlogCategoryTest extends FunctionalTest
$member->logout();
}
$this->objFromFixture('SiteTree', 'FirstBlogPost');
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
/**
* @var BlogCategory $category
*/
$category = $this->objFromFixture('BlogCategory', 'FirstCategory');
$category = $this->objFromFixture(BlogCategory::class, 'FirstCategory');
$this->assertEquals(5, $category->BlogPosts()->count(), 'Category blog post count');
}
@ -69,7 +69,7 @@ class BlogCategoryTest extends FunctionalTest
*/
public function testAllowMultibyteUrlSegment()
{
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$cat = new BlogCategory();
$cat->BlogID = $blog->ID;
$cat->Title = 'تست';
@ -84,10 +84,10 @@ class BlogCategoryTest extends FunctionalTest
{
$this->useDraftSite();
$this->objFromFixture('Member', 'Admin');
$this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$category = $this->objFromFixture('BlogCategory', 'SecondCategory');
$editor = $this->objFromFixture(Member::class, 'Editor');
$category = $this->objFromFixture(BlogCategory::class, 'SecondCategory');
$this->assertFalse($category->canView($editor), 'Editor should not be able to view category.');
}
@ -99,20 +99,20 @@ class BlogCategoryTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$category = $this->objFromFixture('BlogCategory', 'FirstCategory');
$category = $this->objFromFixture(BlogCategory::class, 'FirstCategory');
$this->assertTrue($category->canEdit($admin), 'Admin should be able to edit category.');
$this->assertTrue($category->canEdit($editor), 'Editor should be able to edit category.');
$category = $this->objFromFixture('BlogCategory', 'SecondCategory');
$category = $this->objFromFixture(BlogCategory::class, 'SecondCategory');
$this->assertTrue($category->canEdit($admin), 'Admin should be able to edit category.');
$this->assertFalse($category->canEdit($editor), 'Editor should not be able to edit category.');
$category = $this->objFromFixture('BlogCategory', 'ThirdCategory');
$category = $this->objFromFixture(BlogCategory::class, 'ThirdCategory');
$this->assertTrue($category->canEdit($admin), 'Admin should always be able to edit category.');
$this->assertTrue($category->canEdit($editor), 'Editor should be able to edit category.');
@ -122,8 +122,8 @@ class BlogCategoryTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$category = singleton(BlogCategory::class);
@ -135,19 +135,19 @@ class BlogCategoryTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$category = $this->objFromFixture('BlogCategory', 'FirstCategory');
$category = $this->objFromFixture(BlogCategory::class, 'FirstCategory');
$this->assertTrue($category->canDelete($admin), 'Admin should be able to delete category.');
$this->assertTrue($category->canDelete($editor), 'Editor should be able to category category.');
$category = $this->objFromFixture('BlogCategory', 'SecondCategory');
$category = $this->objFromFixture(BlogCategory::class, 'SecondCategory');
$this->assertTrue($category->canDelete($admin), 'Admin should be able to delete category.');
$this->assertFalse($category->canDelete($editor), 'Editor should not be able to delete category.');
$category = $this->objFromFixture('BlogCategory', 'ThirdCategory');
$category = $this->objFromFixture(BlogCategory::class, 'ThirdCategory');
$this->assertTrue($category->canDelete($admin), 'Admin should always be able to delete category.');
$this->assertTrue($category->canDelete($editor), 'Editor should be able to delete category.');
}

View File

@ -47,7 +47,7 @@ class BlogPostFilterTest extends SapphireTest
/**
* @var Blog $blog
*/
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$this->assertEquals(3, $blog->AllChildren()->Count(), 'Filtered blog posts');

View File

@ -19,7 +19,7 @@ class BlogPostNotificationsTest extends SapphireTest
$this->markTestSkipped('Comments Notification module is not installed');
}
$blogPost = $this->objFromFixture('SiteTree', 'PostC');
$blogPost = $this->objFromFixture(BlogPost::class, 'PostC');
$comment = new \SilverStripe\Comments\Model\Comment();
$comment->Comment = 'This is a comment';
$comment->write();
@ -44,8 +44,8 @@ class BlogPostNotificationsTest extends SapphireTest
if (!class_exists('CommentNotifier')) {
$this->markTestSkipped('Comments Notification module is not installed');
}
$blogPost = $this->objFromFixture('SiteTree', 'PostC');
$comment = new SilverStripe\Comments\Model\Comment();
$blogPost = $this->objFromFixture(BlogPost::class, 'PostC');
$comment = new \SilverStripe\Comments\Model\Comment();
$comment->Comment = 'This is a comment';
$comment->write();
$recipients = $blogPost->notificationRecipients(

View File

@ -30,8 +30,8 @@ class BlogPostTest extends SapphireTest
*/
public function testCanView($date, $user, $page, $canView)
{
$userRecord = $this->objFromFixture('Member', $user);
$pageRecord = $this->objFromFixture('SiteTree', $page);
$userRecord = $this->objFromFixture(Member::class, $user);
$pageRecord = $this->objFromFixture(BlogPost::class, $page);
DBDatetime::set_mock_now($date);
$this->assertEquals($canView, $pageRecord->canView($userRecord));
}
@ -74,7 +74,7 @@ class BlogPostTest extends SapphireTest
public function testCandidateAuthors()
{
$blogpost = $this->objFromFixture('SiteTree', 'PostC');
$blogpost = $this->objFromFixture(BlogPost::class, 'PostC');
$this->assertEquals(7, $blogpost->getCandidateAuthors()->count());
@ -90,12 +90,12 @@ class BlogPostTest extends SapphireTest
public function testCanViewFuturePost()
{
$blogPost = $this->objFromFixture('SiteTree', 'NullPublishDate');
$blogPost = $this->objFromFixture(BlogPost::class, 'NullPublishDate');
$editor = $this->objFromFixture('Member', 'BlogEditor');
$editor = $this->objFromFixture(Member::class, 'BlogEditor');
$this->assertTrue($blogPost->canView($editor));
$visitor = $this->objFromFixture('Member', 'Visitor');
$visitor = $this->objFromFixture(Member::class, 'Visitor');
$this->assertFalse($blogPost->canView($visitor));
}
@ -105,10 +105,10 @@ class BlogPostTest extends SapphireTest
*/
public function testGetDate()
{
$blogPost = $this->objFromFixture('SiteTree', 'NullPublishDate');
$blogPost = $this->objFromFixture(BlogPost::class, 'NullPublishDate');
$this->assertNull($blogPost->getDate());
$blogPost = $this->objFromFixture('SiteTree', 'PostA');
$blogPost = $this->objFromFixture(BlogPost::class, 'PostA');
$this->assertEquals('2012-01-09 15:00:00', $blogPost->getDate());
}
}

View File

@ -54,12 +54,12 @@ class BlogTagTest extends FunctionalTest
$member->logout();
}
$this->objFromFixture('SiteTree', 'FirstBlogPost');
$this->objFromFixture(BlogPost::class, 'FirstBlogPost');
/**
* @var BlogTag $tag
*/
$tag = $this->objFromFixture('BlogTag', 'FirstTag');
$tag = $this->objFromFixture(BlogTag::class, 'FirstTag');
$this->assertEquals(1, $tag->BlogPosts()->count(), 'Tag blog post count');
}
@ -69,7 +69,7 @@ class BlogTagTest extends FunctionalTest
*/
public function testAllowMultibyteUrlSegment()
{
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$tag = new BlogTag();
$tag->BlogID = $blog->ID;
$tag->Title = 'تست';
@ -87,15 +87,15 @@ class BlogTagTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$tag = $this->objFromFixture('BlogTag', 'FirstTag');
$tag = $this->objFromFixture(BlogTag::class, 'FirstTag');
$this->assertTrue($tag->canView($admin), 'Admin should be able to view tag.');
$this->assertTrue($tag->canView($editor), 'Editor should be able to view tag.');
$tag = $this->objFromFixture('BlogTag', 'SecondTag');
$tag = $this->objFromFixture(BlogTag::class, 'SecondTag');
$this->assertTrue($tag->canView($admin), 'Admin should be able to view tag.');
$this->assertFalse($tag->canView($editor), 'Editor should not be able to view tag.');
@ -105,20 +105,20 @@ class BlogTagTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$tag = $this->objFromFixture('BlogTag', 'FirstTag');
$tag = $this->objFromFixture(BlogTag::class, 'FirstTag');
$this->assertTrue($tag->canEdit($admin), 'Admin should be able to edit tag.');
$this->assertTrue($tag->canEdit($editor), 'Editor should be able to edit tag.');
$tag = $this->objFromFixture('BlogTag', 'SecondTag');
$tag = $this->objFromFixture(BlogTag::class, 'SecondTag');
$this->assertTrue($tag->canEdit($admin), 'Admin should be able to edit tag.');
$this->assertFalse($tag->canEdit($editor), 'Editor should not be able to edit tag.');
$tag = $this->objFromFixture('BlogTag', 'ThirdTag');
$tag = $this->objFromFixture(BlogTag::class, 'ThirdTag');
$this->assertTrue($tag->canEdit($admin), 'Admin should always be able to edit tags.');
$this->assertTrue($tag->canEdit($editor), 'Editor should be able to edit tag.');
@ -128,8 +128,8 @@ class BlogTagTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$tag = singleton(BlogTag::class);
@ -141,20 +141,20 @@ class BlogTagTest extends FunctionalTest
{
$this->useDraftSite();
$admin = $this->objFromFixture('Member', 'Admin');
$editor = $this->objFromFixture('Member', 'Editor');
$admin = $this->objFromFixture(Member::class, 'Admin');
$editor = $this->objFromFixture(Member::class, 'Editor');
$tag = $this->objFromFixture('BlogTag', 'FirstTag');
$tag = $this->objFromFixture(BlogTag::class, 'FirstTag');
$this->assertTrue($tag->canDelete($admin), 'Admin should be able to delete tag.');
$this->assertTrue($tag->canDelete($editor), 'Editor should be able to delete tag.');
$tag = $this->objFromFixture('BlogTag', 'SecondTag');
$tag = $this->objFromFixture(BlogTag::class, 'SecondTag');
$this->assertTrue($tag->canDelete($admin), 'Admin should be able to delete tag.');
$this->assertFalse($tag->canDelete($editor), 'Editor should not be able to delete tag.');
$tag = $this->objFromFixture('BlogTag', 'ThirdTag');
$tag = $this->objFromFixture(BlogTag::class, 'ThirdTag');
$this->assertTrue($tag->canDelete($admin), 'Admin should always be able to delete tags.');
$this->assertTrue($tag->canDelete($editor), 'Editor should be able to delete tag.');

View File

@ -38,7 +38,7 @@ class BlogTagsCloudWidgetTest extends SapphireTest
$this->markTestSkipped('Widgets module not installed');
}
$widget = new BlogTagsCloudWidget();
$blog = $this->objFromFixture('SiteTree', 'FourthBlog');
$blog = $this->objFromFixture(Blog::class, 'FourthBlog');
$widget->BlogID = $blog->ID;
$widget->write();
$tags = $widget->getTags()->toArray();

View File

@ -9,6 +9,7 @@ use SilverStripe\CMS\Controllers\ContentController;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\Session;
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\ORM\DataModel;
@ -39,7 +40,7 @@ class BlogTest extends SapphireTest
/**
* @var Blog $blog
*/
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$blog->publish('Stage', 'Live');
}
@ -66,7 +67,7 @@ class BlogTest extends SapphireTest
/**
* @var Blog $blog
*/
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
Config::inst()->update(BlogPost::class, 'show_in_sitetree', true);
$classes = $blog->getExcludedSiteTreeClassNames();
@ -90,7 +91,7 @@ class BlogTest extends SapphireTest
/**
* @var Blog $blog
*/
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$archive = $blog->getArchivedBlogPosts(2013);
@ -112,7 +113,7 @@ class BlogTest extends SapphireTest
/**
* @var Blog $blog
*/
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$link = Controller::join_links($blog->Link('archive'), '2013', '10', '01');
@ -151,7 +152,7 @@ class BlogTest extends SapphireTest
*/
public function testArchiveYear()
{
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$controller = new BlogController($blog);
$this->requestURL($controller, 'first-post/archive/');
$this->assertEquals(2013, $controller->getArchiveYear(), 'getArchiveYear should return 2013');
@ -172,47 +173,47 @@ class BlogTest extends SapphireTest
/**
* @var Blog $firstBlog
*/
$firstBlog = $this->objFromFixture('SiteTree', 'FirstBlog');
$firstBlog = $this->objFromFixture(Blog::class, 'FirstBlog');
/**
* @var Blog $fourthBlog
*/
$fourthBlog = $this->objFromFixture('SiteTree', 'FourthBlog');
$fourthBlog = $this->objFromFixture(Blog::class, 'FourthBlog');
/**
* @var BlogPost $postA
*/
$postA = $this->objFromFixture('SiteTree', 'PostA');
$postA = $this->objFromFixture(BlogPost::class, 'PostA');
/**
* @var BlogPost $postB
*/
$postB = $this->objFromFixture('SiteTree', 'PostB');
$postB = $this->objFromFixture(BlogPost::class, 'PostB');
/**
* @var BlogPost $postC
*/
$postC = $this->objFromFixture('SiteTree', 'PostC');
$postC = $this->objFromFixture(BlogPost::class, 'PostC');
/**
* @var Member $editor
*/
$editor = $this->objFromFixture('Member', 'BlogEditor');
$editor = $this->objFromFixture(Member::class, 'BlogEditor');
/**
* @var Member $writer
*/
$writer = $this->objFromFixture('Member', 'Writer');
$writer = $this->objFromFixture(Member::class, 'Writer');
/**
* @var Member $contributor
*/
$contributor = $this->objFromFixture('Member', 'Contributor');
$contributor = $this->objFromFixture(Member::class, 'Contributor');
/**
* @var Member $visitor
*/
$visitor = $this->objFromFixture('Member', 'Visitor');
$visitor = $this->objFromFixture(Member::class, 'Visitor');
$this->assertEquals('Editor', $fourthBlog->RoleOf($editor));
$this->assertEquals('Contributor', $fourthBlog->RoleOf($contributor));
@ -288,31 +289,37 @@ class BlogTest extends SapphireTest
$this->assertFalse($postC->canPublish($visitor));
}
public function testFilteredCategories()
public function testFilteredCategoriesRoot()
{
$blog = $this->objFromFixture('SiteTree', 'FirstBlog');
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$controller = new BlogController($blog);
// Root url
$this->requestURL($controller, 'first-post');
$this->assertIDsEquals(
$blog->AllChildren()->column('ID'),
$controller->PaginatedList()->column('ID')
);
}
// RSS
public function testFilteredCategoriesRSS()
{
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$controller = new BlogController($blog);
$this->requestURL($controller, 'first-post/rss');
$this->assertIDsEquals(
$blog->AllChildren()->column('ID'),
$controller->PaginatedList()->column('ID')
);
}
public function testFilteredCategoriesTags()
{
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$controller = new BlogController($blog);
// Posts
$firstPostID = $this->idFromFixture('SiteTree', 'FirstBlogPost');
$secondPostID = $this->idFromFixture('SiteTree', 'SecondBlogPost');
$firstFuturePostID = $this->idFromFixture('SiteTree', 'FirstFutureBlogPost');
$secondFuturePostID = $this->idFromFixture('SiteTree', 'SecondFutureBlogPost');
$firstPostID = $this->idFromFixture(BlogPost::class, 'FirstBlogPost');
$firstFuturePostID = $this->idFromFixture(BlogPost::class, 'FirstFutureBlogPost');
$secondFuturePostID = $this->idFromFixture(BlogPost::class, 'SecondFutureBlogPost');
// Request first tag
$this->requestURL($controller, 'first-post/tag/first-tag');
@ -320,6 +327,17 @@ class BlogTest extends SapphireTest
array($firstPostID, $firstFuturePostID, $secondFuturePostID),
$controller->PaginatedList()
);
}
public function testFilteredCategoriesArchive()
{
$blog = $this->objFromFixture(Blog::class, 'FirstBlog');
$controller = new BlogController($blog);
// Posts
$firstPostID = $this->idFromFixture(BlogPost::class, 'FirstBlogPost');
$secondPostID = $this->idFromFixture(BlogPost::class, 'SecondBlogPost');
$secondFuturePostID = $this->idFromFixture(BlogPost::class, 'SecondFutureBlogPost');
// Request 2013 posts
$this->requestURL($controller, 'first-post/archive/2013');
@ -340,8 +358,13 @@ class BlogTest extends SapphireTest
$request = new HTTPRequest('get', $url);
$request->match('$URLSegment//$Action/$ID/$OtherID');
$request->shift();
$session = new Session(null);
$session->start($request);
$request->setSession($session);
$controller->doInit();
$controller->handleRequest($request, new DataModel());
$controller->handleRequest($request);
$session->clearAll();
$session->destroy();
}
/**

View File

@ -1,47 +1,6 @@
# Mock date is set to 2013-10-01 20:00:00
# Write to tables rather than dataobjects for performance
Group:
Administrators:
Title: Administrators
Editors:
Title: Editors
BlogUsers:
Title: Blog Users
Code: blogusers
Permission:
Administrators:
Code: ADMIN
GroupID: =>Group.Administrators
Editors:
Code: CMS_ACCESS_CMSMain
GroupID: =>Group.Editors
BlogUsers:
Code: CMS_ACCESS_CMSMain
GroupID: =>Group.BlogUsers
SiteConfig:
Default:
CanEditType: 'OnlyTheseUsers'
CanCreateTopLevelType: 'OnlyTheseUsers'
SiteConfig_EditorGroups:
A:
SiteConfigID: =>SiteConfig.Default
GroupID: =>Group.Administrators
B:
SiteConfigID: =>SiteConfig.Default
GroupID: =>Group.Editors
SiteConfig_CreateTopLevelGroups:
A:
SiteConfigID: =>SiteConfig.Default
GroupID: =>Group.Administrators
B:
SiteConfigID: =>SiteConfig.Default
GroupID: =>Group.Editors
Member:
SilverStripe\Security\Member:
Admin:
FirstName: Test
Surname: Administrator
@ -61,24 +20,46 @@ Member:
FirstName: Blog
Surname: Visitor
Group_Members:
Admin:
MemberID: =>Member.Admin
GroupID: =>Group.Administrators
Editor:
MemberID: =>Member.Editor
GroupID: =>Group.Editors
BlogEditor:
MemberID: =>Member.BlogEditor
GroupID: =>Group.BlogUsers
Writer:
MemberID: =>Member.Writer
GroupID: =>Group.BlogUsers
Contributor:
MemberID: =>Member.Contributor
GroupID: =>Group.BlogUsers
SilverStripe\Security\Group:
Administrators:
Title: Administrators
Members:
- =>SilverStripe\Security\Member.Admin
Editors:
Title: Editors
Members:
- =>SilverStripe\Security\Member.Editor
BlogUsers:
Title: Blog Users
Code: blogusers
Members:
- =>SilverStripe\Security\Member.BlogEditor
- =>SilverStripe\Security\Member.Writer
- =>SilverStripe\Security\Member.Contributor
SiteTree:
SilverStripe\Security\Permission:
Administrators:
Code: ADMIN
Group: =>SilverStripe\Security\Group.Administrators
Editors:
Code: CMS_ACCESS_CMSMain
Group: =>SilverStripe\Security\Group.Editors
BlogUsers:
Code: CMS_ACCESS_CMSMain
Group: =>SilverStripe\Security\Group.BlogUsers
SilverStripe\SiteConfig\SiteConfig:
Default:
CanEditType: 'OnlyTheseUsers'
CanCreateTopLevelType: 'OnlyTheseUsers'
EditorGroups:
- =>SilverStripe\Security\Group.Administrators
- =>SilverStripe\Security\Group.Editors
CreateTopLevelGroups:
- =>SilverStripe\Security\Group.Administrators
- =>SilverStripe\Security\Group.Editors
SilverStripe\Blog\Model\Blog:
FirstBlog:
ClassName: SilverStripe\Blog\Model\Blog
Title: 'First Blog'
@ -89,292 +70,165 @@ SiteTree:
CanViewType: 'OnlyTheseUsers'
CanEditType: 'OnlyTheseUsers'
URLSegment: 'second-blog'
ViewerGroups:
- =>SilverStripe\Security\Group.Administrators
EditorGroups:
- =>SilverStripe\Security\Group.Administrators
ThirdBlog:
ClassName: SilverStripe\Blog\Model\Blog
Title: 'Third Blog'
CanEditType: 'OnlyTheseUsers'
URLSegment: 'third-blog'
EditorGroups:
- =>SilverStripe\Security\Group.Editors
FourthBlog:
ClassName: SilverStripe\Blog\Model\Blog
Title: 'Fourth Blog'
URLSegment: 'fourth-blog'
Editors: =>SilverStripe\Security\Member.BlogEditor
Writers: =>SilverStripe\Security\Member.Writer
Contributors: =>SilverStripe\Security\Member.Contributor
SilverStripe\Blog\Model\BlogCategory:
FirstCategory:
Title: 'First Category'
URLSegment: 'first-category'
BlogID: =>SilverStripe\Blog\Model\Blog.FirstBlog
SecondCategory:
Title: 'Second Category'
URLSegment: 'second-category'
BlogID: =>SilverStripe\Blog\Model\Blog.SecondBlog
ThirdCategory:
Title: 'Third Category'
URLSegment: 'third-category'
BlogID: =>SilverStripe\Blog\Model\Blog.ThirdBlog
SilverStripe\Blog\Model\BlogTag:
FirstTag:
Title: 'First Tag'
URLSegment: 'first-tag'
BlogID: =>SilverStripe\Blog\Model\Blog.FirstBlog
SecondTag:
Title: 'Second Tag'
URLSegment: 'second-tag'
BlogID: =>SilverStripe\Blog\Model\Blog.SecondBlog
ThirdTag:
Title: 'Third Tag'
URLSegment: 'third-tag'
BlogID: =>SilverStripe\Blog\Model\Blog.ThirdBlog
#Tags for Tag Cloud widget
PopularTag:
Title: 'Popular'
URLSegment: 'popular'
BlogID: =>SilverStripe\Blog\Model\Blog.FourthBlog
CoolTag:
Title: 'Cool'
URLSegment: 'cool'
BlogID: =>SilverStripe\Blog\Model\Blog.FourthBlog
CatTag:
Title: 'Cat'
URLSegment: 'cat'
BlogID: =>SilverStripe\Blog\Model\Blog.FourthBlog
KiwiTag:
Title: 'Kiwi'
URLSegment: 'kiwi'
BlogID: =>SilverStripe\Blog\Model\Blog.FourthBlog
SilverStripe\Blog\Model\BlogPost:
FirstBlogPost:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'First Post'
URLSegment: first-post
ParentID: =>SiteTree.FirstBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FirstBlog
PublishDate: '2013-10-01 15:00:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.FirstTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
SecondBlogPost:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Second Post'
URLSegment: second-post
ParentID: =>SiteTree.FirstBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FirstBlog
PublishDate: '2013-09-01 15:00:00'
ThirdBlogPost:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Old Post'
URLSegment: old-post
ParentID: =>SiteTree.FirstBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FirstBlog
PublishDate: '2012-01-09 15:00:00'
FirstFutureBlogPost:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Future Post'
URLSegment: future-post
ParentID: =>SiteTree.FirstBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FirstBlog
PublishDate: '2015-01-01 00:00:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.FirstTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
SecondFutureBlogPost:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Future Post 2'
URLSegment: future-post-2
ParentID: =>SiteTree.FirstBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FirstBlog
PublishDate: '2013-11-01 00:00:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.FirstTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
PostA:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'One Post'
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
Authors: =>SilverStripe\Security\Member.Writer,=>SilverStripe\Security\Member.Contributor
PublishDate: '2012-01-09 15:00:00'
PostB:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Second Post'
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
Authors: =>SilverStripe\Security\Member.BlogEditor
PublishDate: '2012-01-09 15:00:00'
PostC:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Third Post'
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
Authors: =>SilverStripe\Security\Member.Writer,=>SilverStripe\Security\Member.Contributor,=>SilverStripe\Security\Member.BlogEditor
PublishDate: '2012-01-09 15:00:00'
NullPublishDate:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'No publish date'
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
Authors: =>SilverStripe\Security\Member.Writer,=>SilverStripe\Security\Member.Contributor,=>SilverStripe\Security\Member.BlogEditor
PublishDate: null
#Posts for the tag cloud widget test
TaggedPost1:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Tagged Post 1'
URLSegment: tagged-post-1
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
PublishDate: '2012-01-09 15:00:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.PopularTag,=>SilverStripe\Blog\Model\BlogTag.CoolTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
TaggedPost2:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Tagged Post 2'
URLSegment: tagged-post-2
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
PublishDate: '2012-01-09 15:00:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.PopularTag,=>SilverStripe\Blog\Model\BlogTag.CoolTag,=>SilverStripe\Blog\Model\BlogTag.CatTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
TaggedPost3:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Tagged Post 3'
URLSegment: tagged-post-3
ParentID: =>SiteTree.FourthBlog
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
PublishDate: '2012-01-09 17:20:00'
Tags: =>SilverStripe\Blog\Model\BlogTag.PopularTag,=>SilverStripe\Blog\Model\BlogTag.CoolTag,=>SilverStripe\Blog\Model\BlogTag.CatTag,=>SilverStripe\Blog\Model\BlogTag.KiwiTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
TaggedPost4:
ClassName: SilverStripe\Blog\Model\BlogPost
Title: 'Tagged Post 4'
URLSegment: tagged-post-4
ParentID: =>SiteTree.FourthBlog
BlogPost:
FirstBlogPost:
ID: =>SiteTree.FirstBlogPost
PublishDate: '2013-10-01 15:00:00'
SecondBlogPost:
ID: =>SiteTree.SecondBlogPost
PublishDate: '2013-09-01 15:00:00'
ThirdBlogPost:
ID: =>SiteTree.ThirdBlogPost
PublishDate: '2012-01-09 15:00:00'
FirstFutureBlogPost:
ID: =>SiteTree.FirstFutureBlogPost
PublishDate: '2015-01-01 00:00:00'
SecondFutureBlogPost:
ID: =>SiteTree.SecondFutureBlogPost
PublishDate: '2013-11-01 00:00:00'
PostA:
ID: =>SiteTree.PostA
PublishDate: '2012-01-09 15:00:00'
PostB:
ID: =>SiteTree.PostB
PublishDate: '2012-01-09 15:00:00'
PostC:
ID: =>SiteTree.PostC
PublishDate: '2012-01-09 15:00:00'
NullPublishDate:
ID: =>SiteTree.NullPublishDate
PublishDate: null
#Posts for the tag cloud widget test
TaggedPost1:
ID: =>SiteTree.TaggedPost1
PublishDate: '2012-01-09 15:00:00'
TaggedPost2:
ID: =>SiteTree.TaggedPost2
PublishDate: '2012-01-09 15:00:00'
TaggedPost3:
ID: =>SiteTree.TaggedPost3
PublishDate: '2012-01-09 17:20:00'
TaggedPost4:
ID: =>SiteTree.TaggedPost4
ParentID: =>SilverStripe\Blog\Model\Blog.FourthBlog
PublishDate: '2012-04-09 15:00:00'
Blog_Editors:
FourthBlog:
BlogID: =>SiteTree.FourthBlog
MemberID: =>Member.BlogEditor
Blog_Writers:
FourthBlog:
BlogID: =>SiteTree.FourthBlog
MemberID: =>Member.Writer
Blog_Contributors:
FourthBlog:
BlogID: =>SiteTree.FourthBlog
MemberID: =>Member.Contributor
SiteTree_ViewerGroups:
SecondBlog:
SiteTreeID: =>SiteTree.SecondBlog
GroupID: =>Group.Administrators
SiteTree_EditorGroups:
SecondBlog:
SiteTreeID: =>SiteTree.SecondBlog
GroupID: =>Group.Administrators
ThirdBlog:
SiteTreeID: =>SiteTree.ThirdBlog
GroupID: =>Group.Editors
BlogTag:
FirstTag:
Title: 'First Tag'
URLSegment: 'first-tag'
BlogID: =>SiteTree.FirstBlog
SecondTag:
Title: 'Second Tag'
URLSegment: 'second-tag'
BlogID: =>SiteTree.SecondBlog
ThirdTag:
Title: 'Third Tag'
URLSegment: 'third-tag'
BlogID: =>SiteTree.ThirdBlog
#Tags for Tag Cloud widget
PopularTag:
Title: 'Popular'
URLSegment: 'popular'
BlogID: =>SiteTree.FourthBlog
CoolTag:
Title: 'Cool'
URLSegment: 'cool'
BlogID: =>SiteTree.FourthBlog
CatTag:
Title: 'Cat'
URLSegment: 'cat'
BlogID: =>SiteTree.FourthBlog
KiwiTag:
Title: 'Kiwi'
URLSegment: 'kiwi'
BlogID: =>SiteTree.FourthBlog
BlogCategory:
FirstCategory:
Title: 'First Category'
URLSegment: 'first-category'
BlogID: =>SiteTree.FirstBlog
SecondCategory:
Title: 'Second Category'
URLSegment: 'second-category'
BlogID: =>SiteTree.SecondBlog
ThirdCategory:
Title: 'Third Category'
URLSegment: 'third-category'
BlogID: =>SiteTree.ThirdBlog
BlogPost_Tags:
FirstBlogPost:
BlogPostID: =>SiteTree.FirstBlogPost
BlogTagID: =>BlogTag.FirstTag
FirstFutureBlogPost:
BlogPostID: =>SiteTree.FirstFutureBlogPost
BlogTagID: =>BlogTag.FirstTag
SecondFutureBlogPost:
BlogPostID: =>SiteTree.SecondFutureBlogPost
BlogTagID: =>BlogTag.FirstTag
Tags: =>SilverStripe\Blog\Model\BlogTag.PopularTag
Categories: =>SilverStripe\Blog\Model\BlogCategory.FirstCategory
TaggedPost1A:
BlogPostID: =>SiteTree.TaggedPost1
BlogTagID: =>BlogTag.PopularTag
TaggedPost1B:
BlogPostID: =>SiteTree.TaggedPost1
BlogTagID: =>BlogTag.CoolTag
TaggedPost2A:
BlogPostID: =>SiteTree.TaggedPost2
BlogTagID: =>BlogTag.PopularTag
TaggedPost2B:
BlogPostID: =>SiteTree.TaggedPost2
BlogTagID: =>BlogTag.CoolTag
TaggedPost2C:
BlogPostID: =>SiteTree.TaggedPost2
BlogTagID: =>BlogTag.CatTag
TaggedPost3A:
BlogPostID: =>SiteTree.TaggedPost3
BlogTagID: =>BlogTag.PopularTag
TaggedPost3B:
BlogPostID: =>SiteTree.TaggedPost3
BlogTagID: =>BlogTag.CoolTag
TaggedPost3C:
BlogPostID: =>SiteTree.TaggedPost3
BlogTagID: =>BlogTag.CatTag
TaggedPost3D:
BlogPostID: =>SiteTree.TaggedPost3
BlogTagID: =>BlogTag.KiwiTag
TaggedPost4:
BlogPostID: =>SiteTree.TaggedPost4
BlogTagID: =>BlogTag.PopularTag
BlogPost_Categories:
FirstBlogPost:
BlogPostID: =>SiteTree.FirstBlogPost
BlogCategoryID: =>BlogCategory.FirstCategory
FirstFutureBlogPost:
BlogPostID: =>SiteTree.FirstFutureBlogPost
BlogCategoryID: =>BlogCategory.FirstCategory
SecondFutureBlogPost:
BlogPostID: =>SiteTree.SecondFutureBlogPost
BlogCategoryID: =>BlogCategory.FirstCategory
TaggedPost1:
BlogPostID: =>SiteTree.TaggedPost1
BlogCategoryID: =>BlogCategory.FirstCategory
TaggedPost2:
BlogPostID: =>SiteTree.TaggedPost2
BlogCategoryID: =>BlogCategory.FirstCategory
TaggedPost3:
BlogPostID: =>SiteTree.TaggedPost3
BlogCategoryID: =>BlogCategory.FirstCategory
TaggedPost4:
BlogPostID: =>SiteTree.TaggedPost4
BlogCategoryID: =>BlogCategory.FirstCategory
BlogPost_Authors:
PostAA:
BlogPostID: =>SiteTree.PostA
MemberID: =>Member.Writer
PostAB:
BlogPostID: =>SiteTree.PostA
MemberID: =>Member.Contributor
PostB:
BlogPostID: =>SiteTree.PostB
MemberID: =>Member.BlogEditor
PostCA:
BlogPostID: =>SiteTree.PostC
MemberID: =>Member.BlogEditor
PostCB:
BlogPostID: =>SiteTree.PostC
MemberID: =>Member.Writer
PostCC:
BlogPostID: =>SiteTree.PostC
MemberID: =>Member.Contributor
NullPublishDateA:
BlogPostID: =>SiteTree.NullPublishDate
MemberID: =>Member.BlogEditor
NullPublishDateB:
BlogPostID: =>SiteTree.NullPublishDate
MemberID: =>Member.Writer
NullPublishDateC:
BlogPostID: =>SiteTree.NullPublishDate
MemberID: =>Member.Contributor