silverstripe-blog/tests/Widgets/BlogArchiveWidgetTest.yml
3Dgoo 11c99e74c8
Adding tests
Adding tests to check that archive widget correctly only shows blog posts from the related blog and not any other blog.
2018-06-29 21:29:11 +09:30

46 lines
1001 B
YAML

Blog:
blog-a:
Title: Blog A
blog-b:
Title: Blog B
BlogPost:
post-a:
Title: September Digest
PublishDate: 2017-09-01 00:00:00
ParentID: =>Blog.blog-a
post-b:
Title: August is Awesome
PublishDate: 2017-08-01 00:00:00
ParentID: =>Blog.blog-a
post-c:
Title: 2015 is so two years ago
PublishDate: 2015-05-02 00:01:02
ParentID: =>Blog.blog-a
post-d:
Title: Blog post on Blog B
PublishDate: 2016-03-13 21:05:36
ParentID: =>Blog.blog-b
post-e:
Title: Blog post 2 on Blog B
PublishDate: 2016-06-15 10:00:00
ParentID: =>Blog.blog-b
BlogArchiveWidget:
archive-monthly-a:
NumberToDisplay: 5
ArchiveType: Monthly
BlogID: =>Blog.blog-a
archive-monthly-b:
NumberToDisplay: 5
ArchiveType: Monthly
BlogID: =>Blog.blog-b
archive-yearly-a:
NumberToDisplay: 5
ArchiveType: Yearly
BlogID: =>Blog.blog-a
archive-yearly-b:
NumberToDisplay: 5
ArchiveType: Yearly
BlogID: =>Blog.blog-b