2021-12-14 18:32:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2023-01-10 22:44:09 +00:00
|
|
|
|
|
|
|
namespace Shimmie2;
|
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
class RSSImagesTest extends ShimmiePHPUnitTestCase
|
|
|
|
{
|
2024-01-15 14:31:51 +00:00
|
|
|
public function testImageFeed(): void
|
2019-05-28 16:59:38 +00:00
|
|
|
{
|
|
|
|
$this->log_in_as_user();
|
2020-03-13 09:23:54 +00:00
|
|
|
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->log_out();
|
2009-07-15 01:42:18 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->get_page('rss/images');
|
2020-06-14 16:05:55 +00:00
|
|
|
//$this->assert_mime(MimeType::RSS);
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->get_page('rss/images/1');
|
2020-06-14 16:05:55 +00:00
|
|
|
//$this->assert_mime(MimeType::RSS);
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
# FIXME: test that the image is actually found
|
|
|
|
$this->get_page('rss/images/computer/1');
|
2020-06-14 16:05:55 +00:00
|
|
|
//$this->assert_mime(MimeType::RSS);
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->assert_no_content("Exception");
|
2009-07-16 19:20:53 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
# valid tag, invalid page
|
|
|
|
$this->get_page('rss/images/computer/2');
|
2020-06-14 16:05:55 +00:00
|
|
|
//$this->assert_mime(MimeType::RSS);
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 11:43:44 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
# not found
|
|
|
|
$this->get_page('rss/images/waffle/2');
|
2020-06-14 16:05:55 +00:00
|
|
|
//$this->assert_mime(MimeType::RSS);
|
2019-05-28 16:59:38 +00:00
|
|
|
$this->assert_no_content("Exception");
|
2008-10-18 10:00:34 +00:00
|
|
|
}
|
|
|
|
}
|