test all the things

This commit is contained in:
Shish
2015-09-20 22:40:04 +01:00
parent 13dfb8861f
commit fc2bbefcb9
22 changed files with 189 additions and 224 deletions

View File

@@ -1,5 +1,5 @@
<?php
class RandomTest {
class RandomTest extends ShimmiePHPUnitTestCase {
function testRandom() {
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "test");
@@ -11,17 +11,16 @@ class RandomTest {
$this->get_page("random_image/view/test");
$this->assert_title("Image $image_id: test");
$raw = $this->get_page("random_image/download");
$this->get_page("random_image/download");
# FIXME: assert($raw == file(blah.jpg))
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();
}
function testPostListBlock() {
$this->log_in_as_admin();
$this->get_page("setup");
return; // FIXME
$this->set_field("_config_show_random_block", true);
$this->click("Save Settings");
$this->log_out();