| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | public function testFilter() |
||
| 40 | { |
||
| 41 | $member = Member::currentUser(); |
||
| 42 | |||
| 43 | if ($member) { |
||
| 44 | $member->logout(); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @var Blog $blog |
||
| 49 | */ |
||
| 50 | $blog = $this->objFromFixture(Blog::class, 'FirstBlog'); |
||
| 51 | |||
| 52 | $this->assertEquals(3, $blog->AllChildren()->Count(), 'Filtered blog posts'); |
||
| 53 | |||
| 54 | DBDatetime::set_mock_now('2020-01-01 00:00:00'); |
||
| 55 | |||
| 56 | $this->assertEquals(5, $blog->AllChildren()->Count(), 'Unfiltered blog posts'); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |