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

27 lines
766 B
PHP
Raw Normal View History

2009-07-19 03:48:25 +00:00
<?php
class ReportImageTest extends ShimmieWebTestCase {
function testReportImage() {
$this->log_in_as_user();
$image_id = $this->post_image("ext/simpletest/data/pbx_screenshot.jpg", "pbx computer screenshot");
$this->get_page("post/view/$image_id");
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();
$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-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
}
}
?>