mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
23 lines
508 B
PHP
23 lines
508 B
PHP
|
<?php
|
||
|
|
||
|
class BlogTagTest extends SapphireTest {
|
||
|
|
||
|
static $fixture_file = "blog.yml";
|
||
|
|
||
|
public function setUp() {
|
||
|
SS_Datetime::set_mock_now("2013-10-10 20:00:00");
|
||
|
parent::setUp();
|
||
|
}
|
||
|
|
||
|
public function testBlogPosts() {
|
||
|
$member = Member::currentUser();
|
||
|
if($member) $member->logout();
|
||
|
|
||
|
$post = $this->objFromFixture("BlogPost", "blogpost1");
|
||
|
$tag = $this->objFromFixture("BlogTag", "firsttag");
|
||
|
$posts = $tag->BlogPosts();
|
||
|
$this->assertEquals(1, $posts->count(), "Tag blog post count");
|
||
|
}
|
||
|
|
||
|
}
|