@@ 294-310 (lines=17) @@ | ||
291 | ); |
|
292 | } |
|
293 | ||
294 | public function testFilteredCategoriesTags() |
|
295 | { |
|
296 | $blog = $this->objFromFixture(Blog::class, 'FirstBlog'); |
|
297 | $controller = new BlogController($blog); |
|
298 | ||
299 | // Posts |
|
300 | $firstPostID = $this->idFromFixture(BlogPost::class, 'FirstBlogPost'); |
|
301 | $firstFuturePostID = $this->idFromFixture(BlogPost::class, 'FirstFutureBlogPost'); |
|
302 | $secondFuturePostID = $this->idFromFixture(BlogPost::class, 'SecondFutureBlogPost'); |
|
303 | ||
304 | // Request first tag |
|
305 | $this->requestURL($controller, 'first-post/tag/first-tag'); |
|
306 | $this->assertIDsEquals( |
|
307 | [$firstPostID, $firstFuturePostID, $secondFuturePostID], |
|
308 | $controller->PaginatedList() |
|
309 | ); |
|
310 | } |
|
311 | ||
312 | public function testFilteredCategoriesArchive() |
|
313 | { |
|
@@ 312-328 (lines=17) @@ | ||
309 | ); |
|
310 | } |
|
311 | ||
312 | public function testFilteredCategoriesArchive() |
|
313 | { |
|
314 | $blog = $this->objFromFixture(Blog::class, 'FirstBlog'); |
|
315 | $controller = new BlogController($blog); |
|
316 | ||
317 | // Posts |
|
318 | $firstPostID = $this->idFromFixture(BlogPost::class, 'FirstBlogPost'); |
|
319 | $secondPostID = $this->idFromFixture(BlogPost::class, 'SecondBlogPost'); |
|
320 | $secondFuturePostID = $this->idFromFixture(BlogPost::class, 'SecondFutureBlogPost'); |
|
321 | ||
322 | // Request 2013 posts |
|
323 | $this->requestURL($controller, 'first-post/archive/2013'); |
|
324 | $this->assertIDsEquals( |
|
325 | [$firstPostID, $secondPostID, $secondFuturePostID], |
|
326 | $controller->PaginatedList() |
|
327 | ); |
|
328 | } |
|
329 | ||
330 | /** |
|
331 | * @expectedException \SilverStripe\Control\HTTPResponse_Exception |