2020-01-26 13:19:35 +00:00
|
|
|
<?php declare(strict_types=1);
|
2019-05-28 17:59:38 +01:00
|
|
|
class RSSImagesTest extends ShimmiePHPUnitTestCase
|
|
|
|
{
|
|
|
|
public function testImageFeed()
|
|
|
|
{
|
|
|
|
$this->log_in_as_user();
|
|
|
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
|
|
|
$this->log_out();
|
2009-07-15 02:42:18 +01:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
$this->get_page('rss/images');
|
|
|
|
//$this->assert_mime("application/rss+xml");
|
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
$this->get_page('rss/images/1');
|
|
|
|
//$this->assert_mime("application/rss+xml");
|
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
# FIXME: test that the image is actually found
|
|
|
|
$this->get_page('rss/images/computer/1');
|
|
|
|
//$this->assert_mime("application/rss+xml");
|
|
|
|
$this->assert_no_content("Exception");
|
2009-07-16 20:20:53 +01:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
# valid tag, invalid page
|
|
|
|
$this->get_page('rss/images/computer/2');
|
|
|
|
//$this->assert_mime("application/rss+xml");
|
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 17:59:38 +01:00
|
|
|
# not found
|
|
|
|
$this->get_page('rss/images/waffle/2');
|
|
|
|
//$this->assert_mime("application/rss+xml");
|
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 10:00:34 +00:00
|
|
|
}
|
|
|
|
}
|