2009-07-19 03:48:25 +00:00
|
|
|
<?php
|
2015-09-20 21:40:04 +00:00
|
|
|
class ReportImageTest extends ShimmiePHPUnitTestCase {
|
2015-09-26 10:17:13 +00:00
|
|
|
public function testReportImage() {
|
2009-07-19 03:48:25 +00:00
|
|
|
$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");
|
2009-07-19 03:48:25 +00:00
|
|
|
$this->get_page("post/view/$image_id");
|
2015-09-20 21:40:04 +00:00
|
|
|
|
2015-09-21 09:05:32 +00:00
|
|
|
$this->markTestIncomplete();
|
2015-09-20 21:40:04 +00:00
|
|
|
|
2009-08-19 00:28:48 +00:00
|
|
|
$this->set_field('reason', "report details");
|
2009-07-19 03:48:25 +00:00
|
|
|
$this->click("Report");
|
|
|
|
$this->log_out();
|
|
|
|
|
|
|
|
$this->log_in_as_admin();
|
2009-09-27 14:48:38 +00:00
|
|
|
|
|
|
|
$this->get_page("setup");
|
|
|
|
$this->set_field("_config_report_image_show_thumbs", true);
|
|
|
|
$this->click("Save Settings");
|
2009-07-19 03:48:25 +00:00
|
|
|
$this->get_page("image_report/list");
|
2009-08-19 00:28:48 +00:00
|
|
|
$this->assert_title("Reported Images");
|
|
|
|
$this->assert_text("report details");
|
2009-09-27 14:48:38 +00:00
|
|
|
|
|
|
|
$this->get_page("setup");
|
|
|
|
$this->set_field("_config_report_image_show_thumbs", false);
|
|
|
|
$this->click("Save Settings");
|
|
|
|
$this->get_page("image_report/list");
|
|
|
|
$this->assert_title("Reported Images");
|
|
|
|
$this->assert_text("report details");
|
|
|
|
$this->assert_text("$image_id");
|
|
|
|
|
|
|
|
$this->get_page("image_report/list");
|
2009-07-19 03:48:25 +00:00
|
|
|
$this->click("Remove Report");
|
2009-08-19 00:28:48 +00:00
|
|
|
$this->assert_title("Reported Images");
|
|
|
|
$this->assert_no_text("report details");
|
2009-07-19 03:48:25 +00:00
|
|
|
|
|
|
|
$this->delete_image($image_id);
|
|
|
|
$this->log_out();
|
2009-07-20 05:51:36 +00:00
|
|
|
|
|
|
|
# FIXME: test delete image from report screen
|
|
|
|
# FIXME: test that >>123 works
|
2009-07-19 03:48:25 +00:00
|
|
|
}
|
|
|
|
}
|
2014-04-26 02:54:51 +00:00
|
|
|
|