diff --git a/ext/alias_editor/test.php b/ext/alias_editor/test.php index f714a904..6c2a9514 100644 --- a/ext/alias_editor/test.php +++ b/ext/alias_editor/test.php @@ -26,6 +26,8 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase { * dig into this and determine exactly what is happening. * ********************************************************************* + */ + $this->markTestIncomplete(); $this->log_in_as_admin(); @@ -97,8 +99,6 @@ class AliasEditorTest extends ShimmiePHPUnitTestCase { $this->get_page('alias/list'); $this->assert_title("Alias List"); $this->assert_no_text("Add"); - - */ } } diff --git a/ext/bulk_add/test.php b/ext/bulk_add/test.php index e9fabb75..34382d6d 100644 --- a/ext/bulk_add/test.php +++ b/ext/bulk_add/test.php @@ -11,7 +11,8 @@ class BulkAddTest extends ShimmiePHPUnitTestCase { $this->assertContains("Error, asdf is not a readable directory", $bae->results, implode("\n", $bae->results)); - return; // FIXME: have BAE return a list of successes as well as errors? + // FIXME: have BAE return a list of successes as well as errors? + $this->markTestIncomplete(); $this->get_page('admin'); $this->assert_title("Admin Tools"); diff --git a/ext/comment/test.php b/ext/comment/test.php index 442a79b8..01cbd3fc 100644 --- a/ext/comment/test.php +++ b/ext/comment/test.php @@ -85,8 +85,9 @@ class CommentListTest extends ShimmiePHPUnitTestCase { $this->assert_no_text('ASDFASDF'); } - /* function testSingleDel() { + $this->markTestIncomplete(); + $this->log_in_as_admin(); $image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx"); @@ -106,5 +107,4 @@ class CommentListTest extends ShimmiePHPUnitTestCase { $this->delete_image($image_id); $this->log_out(); } - */ } diff --git a/ext/ipban/test.php b/ext/ipban/test.php index 5e745a2a..cd1887e5 100644 --- a/ext/ipban/test.php +++ b/ext/ipban/test.php @@ -9,7 +9,9 @@ class IPBanTest extends ShimmiePHPUnitTestCase { $this->get_page('ip_ban/list'); $this->assert_no_text("42.42.42.42"); - /* + + $this->markTestIncomplete(); + $this->set_field('ip', '42.42.42.42'); $this->set_field('reason', 'unit testing'); $this->set_field('end', '1 week'); @@ -18,7 +20,6 @@ class IPBanTest extends ShimmiePHPUnitTestCase { $this->assert_text("42.42.42.42"); $this->click("Remove"); // FIXME: remove which ban? :S $this->assert_no_text("42.42.42.42"); - */ $this->get_page('ip_ban/list?all=on'); // just test it doesn't crash for now diff --git a/ext/link_image/test.php b/ext/link_image/test.php index 09138953..0c890895 100644 --- a/ext/link_image/test.php +++ b/ext/link_image/test.php @@ -9,7 +9,8 @@ class LinkImageTest extends ShimmiePHPUnitTestCase { # in there, see if it takes us to the right page $this->get_page("post/view/$image_id"); - /* + $this->markTestIncomplete(); + // FIXME $matches = array(); preg_match("#value='(http://.*(/|%2F)post(/|%2F)view(/|%2F)[0-9]+)'#", $raw, $matches); @@ -18,7 +19,6 @@ class LinkImageTest extends ShimmiePHPUnitTestCase { $this->get($matches[1]); $this->assert_title("Image $image_id: pie"); } - */ } } diff --git a/ext/tag_edit/test.php b/ext/tag_edit/test.php index fcc2ff09..3abdc82e 100644 --- a/ext/tag_edit/test.php +++ b/ext/tag_edit/test.php @@ -48,10 +48,12 @@ class TagEditTest extends ShimmiePHPUnitTestCase { $this->log_out(); } -/* - * FIXME: Mass Tagger seems to be broken, and this test case always fails. - * + /* + * FIXME: Mass Tagger seems to be broken, and this test case always fails. + */ function testMassEdit() { + $this->markTestIncomplete(); + $this->log_in_as_admin(); $image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx"); @@ -71,6 +73,5 @@ class TagEditTest extends ShimmiePHPUnitTestCase { $this->log_out(); } -*/ } diff --git a/ext/tag_history/test.php b/ext/tag_history/test.php index a8730917..3837fa07 100644 --- a/ext/tag_history/test.php +++ b/ext/tag_history/test.php @@ -6,7 +6,8 @@ class TagHistoryTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id"); $this->assert_title("Image $image_id: pbx"); - /* + $this->markTestIncomplete(); + // FIXME $this->set_field("tag_edit__tags", "new"); $this->click("Set"); @@ -15,7 +16,6 @@ class TagHistoryTest extends ShimmiePHPUnitTestCase { $this->assert_text("new (Set by demo"); $this->click("Revert To"); $this->assert_title("Image $image_id: pbx"); - */ $this->get_page("tag_history/all/1"); $this->assert_title("Global Tag History"); diff --git a/ext/upload/test.php b/ext/upload/test.php index 70f32368..1051c9bb 100644 --- a/ext/upload/test.php +++ b/ext/upload/test.php @@ -33,15 +33,15 @@ class UploadTest extends ShimmiePHPUnitTestCase { } function testRejectHuge() { - /* + $this->markTestIncomplete(); + // FIXME: huge.dat is rejected for other reasons; manual testing shows that this works file_put_contents("huge.dat", file_get_contents("tests/pbx_screenshot.jpg") . str_repeat("U", 1024*1024*3)); - $image_id_4 = $this->post_image("index.php", "test"); + $this->post_image("index.php", "test"); $this->assert_response(200); $this->assert_title("Upload Status"); $this->assert_text("File too large"); unlink("huge.dat"); - */ } } diff --git a/ext/view/test.php b/ext/view/test.php index ae63fa50..a467ea9f 100644 --- a/ext/view/test.php +++ b/ext/view/test.php @@ -1,5 +1,10 @@ log_in_as_user(); $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test"); @@ -9,8 +14,16 @@ class ViewTest extends ShimmiePHPUnitTestCase { $this->get_page("post/view/$image_id_1"); $this->assert_title("Image $image_id_1: test"); + } + + function testPrevNext() { + $this->markTestIncomplete(); + + $this->log_in_as_user(); + $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test"); + $image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2"); + $image_id_3 = $this->post_image("tests/favicon.png", "test"); - /* $this->click("Prev"); $this->assert_title("Image $image_id_2: test2"); @@ -19,22 +32,35 @@ class ViewTest extends ShimmiePHPUnitTestCase { $this->click("Next"); $this->assert_title("Image not found"); - */ + } + + public function testView404() { + $this->log_in_as_user(); + $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test"); + $image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2"); + $image_id_3 = $this->post_image("tests/favicon.png", "test"); + $idp1 = $image_id_3 + 1; $this->get_page("post/view/$idp1"); $this->assert_title('Image not found'); $this->get_page('post/view/-1'); $this->assert_title('Image not found'); + } - /* - * FIXME: this assumes Nice URLs. - * + public function testNextSearchResult() { + $this->markTestIncomplete(); + + $this->log_in_as_user(); + $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "test"); + $image_id_2 = $this->post_image("tests/bedroom_workshop.jpg", "test2"); + $image_id_3 = $this->post_image("tests/favicon.png", "test"); + + // FIXME: this assumes Nice URLs. # note: skips image #2 $this->get_page("post/view/$image_id_1?search=test"); // FIXME: assumes niceurls $this->click("Prev"); $this->assert_title("Image $image_id_3: test"); - */ } } diff --git a/ext/wiki/test.php b/ext/wiki/test.php index 76a331ce..0a5c4699 100644 --- a/ext/wiki/test.php +++ b/ext/wiki/test.php @@ -6,8 +6,9 @@ class WikiTest extends ShimmiePHPUnitTestCase { $this->assert_text("This is a default page"); } -/* function testAccess() { + $this->markTestIncomplete(); + global $config; foreach(array("anon", "user", "admin") as $user) { foreach(array(false, true) as $allowed) { @@ -40,6 +41,8 @@ class WikiTest extends ShimmiePHPUnitTestCase { } function testLock() { + $this->markTestIncomplete(); + global $config; $config->set_bool("wiki_edit_anon", true); $config->set_bool("wiki_edit_user", false); @@ -74,6 +77,8 @@ class WikiTest extends ShimmiePHPUnitTestCase { } function testDefault() { + $this->markTestIncomplete(); + $this->log_in_as_admin(); $this->get_page("wiki/wiki:default"); $this->assert_title("wiki:default"); @@ -91,6 +96,8 @@ class WikiTest extends ShimmiePHPUnitTestCase { } function testRevisions() { + $this->markTestIncomplete(); + $this->log_in_as_admin(); $this->get_page("wiki/test"); $this->assert_title("test"); @@ -111,6 +118,5 @@ class WikiTest extends ShimmiePHPUnitTestCase { $this->click("Delete All"); $this->log_out(); } -*/ }