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/handle_svg/test.php

23 lines
692 B
PHP
Raw Normal View History

2009-07-16 19:21:49 +00:00
<?php
2015-09-20 20:20:28 +00:00
class SVGHandlerTest extends ShimmiePHPUnitTestCase {
2015-09-26 10:17:13 +00:00
public function testSVGHander() {
2009-07-16 19:21:49 +00:00
$this->log_in_as_user();
2015-08-09 11:14:28 +00:00
$image_id = $this->post_image("tests/test.svg", "something");
2015-09-20 20:20:28 +00:00
$this->get_page("post/view/$image_id"); // test for no crash
$this->get_page("get_svg/$image_id"); // test for no crash
$this->assert_content("www.w3.org");
2009-09-27 14:48:38 +00:00
2009-07-20 05:51:36 +00:00
# FIXME: test that the thumb works
# FIXME: test that it gets displayed properly
2009-07-16 19:21:49 +00:00
}
2018-02-20 21:35:43 +00:00
public function testAbuiveSVG() {
$this->log_in_as_user();
$image_id = $this->post_image("tests/alert.svg", "something");
$this->get_page("post/view/$image_id");
$this->get_page("get_svg/$image_id");
$this->assert_no_content("script");
}
2009-07-16 19:21:49 +00:00
}
2015-09-20 20:20:28 +00:00