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/image/test.php
2015-09-20 20:03:29 +01:00

20 lines
625 B
PHP

<?php
class ImageTest { // extends ShimmiePHPUnitTestCase {
public function testUserStats() {
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
# test collision
$this->post_image("tests/pbx_screenshot.jpg", "test");
$this->assert_text("already has hash");
$this->get_page("user/test");
$this->assert_text("Images uploaded: 1");
//$this->click("Images uploaded");
//$this->assert_title("Image $image_id: test");
# test that serving manually doesn't cause errors
$this->get_page("image/$image_id/moo.jpg");
$this->get_page("thumb/$image_id/moo.jpg");
}
}