63b2601e67
Changed mime type map to deal with the reality that certain file types have multiple extensions and/or multiple mime types, as well as constants supporting all of the data. Created new functions using the updated mime type map to resolve mime types and extensions. Updated various items around the project that determine mime/extension to take advantage of the new functions.
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php declare(strict_types=1);
|
|
class RSSImagesTest extends ShimmiePHPUnitTestCase
|
|
{
|
|
public function testImageFeed()
|
|
{
|
|
$this->log_in_as_user();
|
|
$this->post_image("tests/pbx_screenshot.jpg", "pbx computer screenshot");
|
|
$this->log_out();
|
|
|
|
$this->get_page('rss/images');
|
|
//$this->assert_mime(MIME_TYPE_RSS);
|
|
$this->assert_no_content("Exception");
|
|
|
|
$this->get_page('rss/images/1');
|
|
//$this->assert_mime(MIME_TYPE_RSS);
|
|
$this->assert_no_content("Exception");
|
|
|
|
# FIXME: test that the image is actually found
|
|
$this->get_page('rss/images/computer/1');
|
|
//$this->assert_mime(MIME_TYPE_RSS);
|
|
$this->assert_no_content("Exception");
|
|
|
|
# valid tag, invalid page
|
|
$this->get_page('rss/images/computer/2');
|
|
//$this->assert_mime(MIME_TYPE_RSS);
|
|
$this->assert_no_content("Exception");
|
|
|
|
# not found
|
|
$this->get_page('rss/images/waffle/2');
|
|
//$this->assert_mime(MIME_TYPE_RSS);
|
|
$this->assert_no_content("Exception");
|
|
}
|
|
}
|