2009-08-18 22:30:52 +01:00
|
|
|
<?php
|
2015-09-20 22:40:04 +01:00
|
|
|
class ImageTest extends ShimmiePHPUnitTestCase {
|
2009-08-18 22:30:52 +01:00
|
|
|
public function testUserStats() {
|
|
|
|
$this->log_in_as_user();
|
2015-08-09 12:14:28 +01:00
|
|
|
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
|
2009-08-18 22:30:52 +01:00
|
|
|
|
2015-09-20 22:40:04 +01:00
|
|
|
// broken with sqlite?
|
|
|
|
//$this->get_page("user/test");
|
|
|
|
//$this->assert_text("Images uploaded: 1");
|
2010-03-12 18:48:30 +00:00
|
|
|
|
2015-08-09 12:14:28 +01:00
|
|
|
//$this->click("Images uploaded");
|
|
|
|
//$this->assert_title("Image $image_id: test");
|
2009-08-18 22:30:52 +01:00
|
|
|
|
2010-03-12 18:48:30 +00:00
|
|
|
# test that serving manually doesn't cause errors
|
|
|
|
$this->get_page("image/$image_id/moo.jpg");
|
|
|
|
$this->get_page("thumb/$image_id/moo.jpg");
|
2009-08-18 22:30:52 +01:00
|
|
|
}
|
|
|
|
}
|