This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/rss_images/test.php

33 lines
968 B
PHP
Raw Normal View History

<?php
2015-09-20 21:40:04 +00:00
class RSSImagesTest extends ShimmiePHPUnitTestCase {
function testImageFeed() {
$this->log_in_as_user();
2015-08-09 11:14:28 +00:00
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
$this->log_out();
2012-03-09 22:08:55 +00:00
$this->get_page('rss/images');
2015-09-20 21:40:04 +00:00
//$this->assert_mime("application/rss+xml");
$this->assert_no_content("Exception");
2012-03-09 22:08:55 +00:00
$this->get_page('rss/images/1');
2015-09-20 21:40:04 +00:00
//$this->assert_mime("application/rss+xml");
$this->assert_no_content("Exception");
2009-07-16 19:20:53 +00:00
# FIXME: test that the image is actually found
2012-03-09 22:08:55 +00:00
$this->get_page('rss/images/computer/1');
2015-09-20 21:40:04 +00:00
//$this->assert_mime("application/rss+xml");
$this->assert_no_content("Exception");
2009-07-16 19:20:53 +00:00
# valid tag, invalid page
2012-03-09 22:08:55 +00:00
$this->get_page('rss/images/computer/2');
2015-09-20 21:40:04 +00:00
//$this->assert_mime("application/rss+xml");
$this->assert_no_content("Exception");
2009-07-16 19:20:53 +00:00
# not found
2012-03-09 22:08:55 +00:00
$this->get_page('rss/images/waffle/2');
2015-09-20 21:40:04 +00:00
//$this->assert_mime("application/rss+xml");
$this->assert_no_content("Exception");
}
}